3411 Commits

Author SHA1 Message Date
Juan Cruz Viotti
7b791d622f feat(GUI): support new "pending" drive flag (#1709)
We recently added a "pending" flag to all drives that represents whether
the drive is ready for selection or not. This flag will be used by the
"usbboot" flashing adaptor, which will emit various "pending" USB
devices while it converts them to block devices that can actually be
flashed.

In terms of the GUI, the following visible changes were made:

- Drives with a `pending: true` property will be disabled in the drive
  selector window
- Drives with a `pending: true` property have a "PENDING" red badge

See: https://github.com/resin-io/etcher/pull/1707
See: https://github.com/resin-io/etcher/pull/1686
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-24 19:56:12 -04:00
Juan Cruz Viotti
f3c8ec496a test(shared): ensure drive objects can contain extra properties (#1705)
The usbboot integration will bring in drive objects that include a lot
more properties than the current drive objects. This commit ensures that
the redux store can handle those extra properties.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-24 19:27:38 -04:00
Juan Cruz Viotti
9f4712f1f8 refactor: use an SDK orchestrator to implement drive scanning (#1707)
This is a major first step towards adopting an SDK architecture. This
commit creates an SDK adaptor with a `.scan()` function that uses
`drivelist` under the hood. Then, an SDK orchestrator is used to provide
drive scanning capabilities to the GUI.

Here's a list of some particularly interesting changes:

- The drives returned by the SDK adaptor now have a "pending" and an
  "adaptor" property. The "pending" property is a boolean flag that
  determines if the drive is ready to be used (this will come handy for
  usbboot), while the "adaptor" property simply contains the name of the
  adaptor that drive came from

- The GUI drive scanner Rx implementation was replaces with a "promise
  loop." Before, the drive scanning routine would be called every 2
  seconds (without waiting for the previous scan to complete), while
  now, the next scan happens *after* the previous scan completes. For
  this reason, I reduced the drive scanning interval timeout to match
  the timing we had before

Change-Type: patch
See: https://github.com/resin-io/etcher/pull/1686
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-24 17:24:48 -04:00
Juan Cruz Viotti
f9d7dd2977 upgrade: drivelist to v5.1.5 (#1692)
See https://github.com/resin-io-modules/drivelist/pull/206

Change-Type: patch
Changelog-Entry: Fix "Couldn't scan the drives: An unknown error occurred" error when there is a drive locked with BitLocker.
Fixes: https://github.com/resin-io/etcher/issues/1687
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-21 17:59:16 -04:00
Juan Cruz Viotti
63d030d4c9
Revert "chore: cache Travis CI docker builds (#1694)"
This reverts commit 5e13be92f50b6f99d8c74ccc36290ff9cd2369b5.
2017-08-15 17:49:30 -04:00
Juan Cruz Viotti
7b308b0e50 chore: fix build system (#1695)
- Bintray deployments are broken because of some bash nested quoting
  issue
- Travis CI will attempt to cache Docker layers on macOS
- Docker caches from different architectures will override each other

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-15 15:07:15 -04:00
Juan Cruz Viotti
5e13be92f5 chore: cache Travis CI docker builds (#1694)
Let's see if we can reduce the time it gets to build and test Etcher on
GNU/Linux.

See: https://giorgos.sealabs.net/docker-cache-on-travis-and-docker-112.html
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-15 13:58:35 -04:00
Juan Cruz Viotti
325fc22a3b docs: add chocolatey install instructions (#1685)
Fixes: https://github.com/resin-io/etcher/issues/1155
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-10 17:25:07 -07:00
Juan Cruz Viotti
5196ac8d32 refactor: simplify release type handling within the app (#1667)
As another step towards moving to GitHub Releases, this commit makes the
application care much less about the actual release type of the current
version, instead checking if the application is stable or not, which is
more aligned to what GitHub provides us.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-09 08:43:19 -07:00
Juan Cruz Viotti
79a7a03d03 chore: enforce single quotes in ESLint (#1679)
We recently adopted the standardjs guidelines ESLint, which doesn't seem
to enforce single quotes, even though the guidelines mention it.

See: https://github.com/resin-io/etcher/pull/1663#discussion_r131623802
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-08 08:42:04 -07:00
Juan Cruz Viotti
b97d7080e5
v1.1.2 v1.1.2 2017-08-07 11:26:15 -04:00
Juan Cruz Viotti
b8709d10c7 upgrade: drivelist to v5.1.4 (#1675)
Change-Type: patch
Changelog-Entry: Improve Windows drive detection error codes.
See: https://github.com/resin-io-modules/drivelist/pull/204
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-07 08:10:38 -07:00
Jonas Hermsmeier
762d570f8b refactor(gui): Only enable full debug output on demand (#1600)
This disables full wildcard debug output by default now,
leave the possibility to manually enable selective debug output
via the `DEBUG` environment variable.

Change-Type: patch
2017-08-07 07:56:28 -07:00
Jonas Hermsmeier
a2f1ddddb5 fix(svg-icon): Handle DOMParser parsererrors (#1663)
This checks for `parsererror`s in the DOMParser's returned document,
to prevent re-use of the previous image and avoid displaying an error
document in the SVG icon slot.

Change-Type: patch
Changelog-Entry: Avoid "broken" icon when selecting a zip image archive with invalid SVG.
2017-08-07 07:29:30 -07:00
Juan Cruz Viotti
b5b98cf392 chore: add type option to bintray publish script (#1670)
Used to not hardcode the architecture type, and to be able to
conditionally set the Bintray Debian headers.

See: https://github.com/resin-io/etcher/pull/1611#discussion_r131349440
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-06 19:56:17 -07:00
Juan Cruz Viotti
4827267af6 chore: add a publish-all make target (#1666)
The CI servers currently call `installers-all` to deploy snapshot
builds, however that target builds the installers, but doesn't call the
phony rules that actually publishes them.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 18:13:50 -04:00
Benedict Aas
de63d534c5 fix(GUI): make disabled svgs work in img tags (#1661)
SVGs are displayed through IMG tags, but these do not support CSS
`fill`, and as such we work around it with `opacity`.
2017-08-03 12:30:00 -04:00
Juan Cruz Viotti
269aafd625 fix(GUI): log known user errors when querying S3 for updates (#1655)
We send an HTTP request to S3 to determine the latest available version.
There are various error that can happen that we don't have control over
(like `ETIMEDOUT`).

The current approach is to whitelist certain errors and pretend there is
no update available, however this commit improves that whole situation.

Instead of swallowing these errors, we throw a user error from the
function that determines the latest available version. From the
application code, we check if that function throws a user error, and if
so, instead of showing it to the user, we log a mixpanel event and carry
on.

This change is motivated by the latest reporter error we can't do
anything about: `UNABLE_TO_GET_ISSUER_CERT_LOCALLY`.

Fixes: https://github.com/resin-io/etcher/issues/1525
Change-Type: patch
Changelog-Entry: Fix `UNABLE_TO_GET_ISSUER_CERT_LOCALLY` error at startup when behind certain proxies.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 10:23:34 -04:00
Juan Cruz Viotti
d8e31665a0 chore: follow standardjs guidelines (#1664)
- Extend the `standard` ESLint configuration
- Remove ESLint rules that are defined in the `standard` configuration
- Get rid of semi-colons

See: https://github.com/resin-io/etcher/pull/1657
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 09:01:54 -04:00
Juan Cruz Viotti
5c19b70e83 refactor: adhere mostly to StandardJS guidelines (#1657)
This commit changes the whole codebase to adhere to all StandardJS
guidelines rules except semicolons, since the removal of semicolons
affect pretty much all lines, and the final diff is very hard to follow
(and to assess other more involved changes).

In a nutshell:

- When using `function`, we now require a space before the opening
  parenthesis
- If a line with operators is broken into multiple lines, the operator
  should now go after the line break
- Unnecessary padding lines are now forbidden

There were also some minor things that the `standard` CLI caught that I
updated here.

See: https://standardjs.com
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 06:59:02 -04:00
Dhruv Paranjape
064c741e3f docs(README): Add documentation for rpm packages. (#1652) 2017-08-02 10:14:25 -04:00
Juan Cruz Viotti
f05b28218c fix: ignore EHOSTDOWN errors when querying S3 (#1654)
There's not much we can do if we can't connect to S3 to determine the
latest available versions when checking if we should show an update
notification dialog or not.

As with similar errors, lets swallow this particular one, and try again
the next time Etcher runs.

Change-Type: patch
Changelog-Entry: Fix `EHOSTDOWN` error at startup.
Fixes: https://github.com/resin-io/etcher/issues/1645
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-02 10:12:45 -04:00
Juan Cruz Viotti
4b4e6ea035 upgrade: drivelist to v5.1.3 (#1653)
This version contains the following fixes:

- Fix "Couldn't initialize the scanner: An unknown error occurred" error
- Fix "Couldn't scan the drives: An unknown error occurred" where there
  is a mounted virtual drive

See: https://github.com/resin-io-modules/drivelist/blob/master/CHANGELOG.md
Change-Type: patch
Changelog-Entry: Fix various drive scanning Windows errors.
Fixes: https://github.com/resin-io/etcher/issues/1646
Fixes: https://github.com/resin-io/etcher/issues/1639
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-02 10:12:27 -04:00
Juan Cruz Viotti
861b8a4450 fix(GUI): throw a user error if the user is not in the sudoers file (#1620)
Change-Type: patch
Changelog-Entry: Display a user-friendly error message if the user is not in the sudoers file.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 17:35:45 -04:00
Benedict Aas
70ad86534d feat(GUI): make size units closest relative (#1539)
We make the size units used the closest relative unit through a new
filter `closestUnit` replacing the old `gigabyte` filter.

Changelog-Entry: Round byte sizes to the more appropriate unit.

* remove filters folder

* new shrinkwrap, add to package.json

* test
2017-08-01 17:34:13 -04:00
Benedict Aas
7714e8b50a fix(GUI): make archive-embedded svgs work again (#1642)
We make the svg-icon component accept XML in its path argument to handle
archive-embedded SVG icons.

Changelog-Entry: Make archive-embedded SVG icons work again.
Fixes: https://github.com/resin-io/etcher/issues/1636
2017-08-01 12:34:06 -04:00
Juan Cruz Viotti
a63b6bf18c fix(CLI): pass required arguments to flashComplete message (#1630)
The `flashComplete` message takes the drive object and the image
basename as arguments. This was updated on the GUI, but causes the CLI
to throw an error upon completion.

Change-Type: patch
Changelog-Entry: Fix "imageBasename is not defined" error on the CLI.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 12:32:50 -04:00
moragues
70c79f6127 feat: support rpi-sdcard image file type (#1648)
Support the rpi-sdcard image file type output by Yocto for
the Raspberry Pi device.

Change-Id: Ia7e3aef0d90fdf21d373a560e6dd2b96e6b51da8
Changelog-Entry: Add support for `.rpi-sdcard` images.
2017-08-01 10:34:25 -04:00
Juan Cruz Viotti
de62b2e65c chore: publish development Bintray packages (#1611)
This commit includes several changes to adapt the CI configuration files
and Bintray publish script to perform development deployments.

- Move our Bintray details to the Makefile
- Deploy to a new Bintray component if `RELEASE_TYPE` is `snapshot`
- Call `publish-bintray-debian` and `publish-bintray-redhat` in the CI
  deployment script
- Call the Bintray deployment scripts for RPMs

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 10:29:09 -04:00
Juan Cruz Viotti
1103492193 refactor: address review comments from #1625 (#1647)
That PR was merged in a rush, so this is the follow-up commit addressing
the review comments made there.

See: https://github.com/resin-io/etcher/pull/1625
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 10:27:59 -04:00
Juan Cruz Viotti
fc3eeff1c9 refactor(GUI): make settings model setter asynchronous (#1597)
This is part of the process of implementing support for a configuration
file. We previously decoupled the Redux store from localStorage by
moving the logic that actually persists the data to localStorage to a
local-settings.js file, however the localStorage API is synchronous, so
it follows that at the moment, all functions that interact with are also
synchronous.

Moving to storing the settings to a file means turning all these
functions to promises, which we do in this commit, in order to not mix
the addition of the configuration file feature with the huge amount of
refactoring it requires.

See: https://github.com/resin-io/etcher/issues/1356
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 10:27:15 -04:00
Juan Cruz Viotti
205711da7e refactor(image-stream): parse xz and gzip metadata using a custom read function (#1590)
This commit refactors the xz and gzip image handlers to pass/use a
custom read function to be able to determine the uncompressed size, and
other needed metadata.

By using this function (which currently only uses the `fs` module), we
can implement support for getting the uncompressed size of compressed
files using HTTP Ranges.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 10:24:19 -04:00
Lucas Rangit MAGASWERAN
57709942a0 docs(README): add debian repository in one line (#1649)
For convenience, create the apt source file and add the repository in one line.

Signed-off-by: Lucas Magasweran <lucas.magasweran@ieee.org>
2017-07-31 16:06:25 -03:00
Juan Cruz Viotti
5e582ceb98 chore: use electron-builder default package names (#1609)
We're currently manually changing the names of the final packages
created by `electron-builder`. This commit makes Etcher use the default
package names that `electron-builder` picks for us.

The Windows final package names contain spaces, so I did keep the
`artifactName` entries for them, which now basically use what
`electron-builder` recommends, but use hyphens instead of spaces.

Change-Type: minor
See: https://github.com/resin-io/etcher/pull/1555
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-31 16:04:10 -03:00
Jonas Hermsmeier
25d50fed74 doc: Merge running locally into contributing guide (#1640)
As recently several people have been asking for things
that are described in `RUNNING-LOCALLY.md`, but couldn't be
found in the `CONTRIBUTING.md`, this consilidates the two into
one single resource to look for on how to get started developing.

Change-Type: patch
2017-07-31 17:24:33 +02:00
Jonas Hermsmeier
07ac2ecf4c doc: Add link to commit guidelines to contributing guide (#1641)
This adds a reference to the commit guidelines to the contributing guide.
Fixes #1494

Change-Type: patch
2017-07-28 12:44:15 +02:00
Juan Cruz Viotti
7908c39ef4
v1.1.1
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
v1.1.1
2017-07-25 09:50:24 -03:00
Juan Cruz Viotti
b64ef705e8 chore: use old custom build system to create AppImages (#1625)
electron-builder seems to ship with an older AppImages version that
doesn't play very well with the custom AppImages elevation system we
created.

More particularly, we can't execute custom binaries inside the mounted
AppImage given that the mount point seems to lose permissions, owner,
and group file information.

This commit goes back to our old custom build system just for AppImages,
until we properly solve the problem, which will likely involve updating
the AppImages version in electron-builder.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-25 09:47:33 -03:00
Jonas Hermsmeier
36664fb251 fix(writer): Use final size if it's not an estimation (#1587)
This avoids running into the "flashstate percentage above 100%" error again.

Change-Type: patch
Changelog-Entry: Prevent "percentage above 100%" errors on DMG images.
2017-07-24 16:54:02 -03:00
Andrew Scheller
fa8f8151f6 docs(PUBLISHING): fix Etcher forum link (#1626) 2017-07-24 19:55:34 +01:00
Andrew Scheller
bebedf1a50 chore: make distclean now deletes build directory too (#1624) 2017-07-24 13:12:46 -03:00
Juan Cruz Viotti
f53a0af150 upgrade: mountutils to v1.2.1 (#1623)
This version contains a fix to a set of very recurrent "Unmount failed"
macOS errors.

See: https://github.com/resin-io-modules/mountutils/pull/44
Change-Type: patch
Changelog-Entry: Fix most "Unmount failed" errors on macOS.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-24 09:36:31 -03:00
Juan Cruz Viotti
09bf430a1e chore: remove the concept of target and host platforms (#1610)
Its very unlikely that we will ever support cross platform builds. For
that reason, let's simplify the whole Makefile by removing the concept
of target and host platforms.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-23 23:33:05 -03:00
Juan Cruz Viotti
b221914a3d fix(GUI): properly pass error object to "Flash error" event (#1619)
Simply running `_.merge` on an Error object results in an empty plain
object `{}` being sent to Mixpanel/Sentry.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-23 23:32:50 -03:00
Juan Cruz Viotti
1d66794450 fix(windows): include local native modules in final asar (#1616)
Etcher has local native code that gets built to `build/`, but that's not
being included inside the final asar.

The fix is to manually add the `*.node` files inside `build/Release` by
adding the appropriate wilcard to the `files` section of
`electron-builder.yml`.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
v1.1.0
2017-07-21 09:10:46 -03:00
Juan Cruz Viotti
1563a2392d
v1.1.0
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-20 14:48:30 -03:00
Juan Cruz Viotti
a19b0e028f upgrade: drivelist to v5.0.27 (#1607)
This new version contains the following PRs that we're interested about:

- https://github.com/resin-io-modules/drivelist/pull/196

To reduce the amount of debug logging we produce (see
https://github.com/resin-io/etcher/pull/1600).

- https://github.com/resin-io-modules/drivelist/pull/195

To properly handle spawning EAGAIN errors.

Fixes: https://github.com/resin-io/etcher/issues/1578
Change-Type: patch
Changelog-Entry: Retry various times on EAGAIN when spawning drive scanning scripts.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-19 15:23:32 -03:00
Andrew Scheller
fa60a746a2 chore: fix typos in target-convert.sh (#1608) 2017-07-19 10:04:15 -03:00
Benedict Aas
227533a7f9 upgrade(package): update resin-corvus to 1.0.0-beta.28 (#1604)
Closes: https://github.com/resin-io/etcher/issues/1465
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-18 14:54:03 -03:00
Juan Cruz Viotti
4122e0bf1d refactor: move most models to lib/shared/ (#1596)
Now that the Redux store is no longer front-end dependent, we can move
most of the models to lib/shared. Currently, lib/shared is a mess, and
contains all sorts of functionality, however moving things out of the
GUI is the first step. Once we have everything decoupled, we can
organise all the code we have there.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-18 12:34:10 -03:00