We use that variable in the Makefile but we're not defining it, which
means that maintainers publishing Etcher need to remember to pass that
as an option.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
- Add missing backslash that caused the command to not be interpreted
completely
- Update `electron-sign-exe.exe` to `electron-sign-exe-win32.exe` in
Makefile
- Use hyphen options instead of Windows slash style, which confuses bash
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
See: https://github.com/resin-io-modules/drivelist/pull/146
Change-Type: patch
Changelog-Entry: Don't ignore errors coming from the Windows drive detection script.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
I edited these files in Windows, which seems to have caused the
permissions bits to get lost.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
codespell works by having a dictionary of pairs of malformed words and
their correct equivalents. This means that codespell will not catch most
issues out of the box, but we can train it based on the common spelling
issues we encounter along the way.
The plan is to add a pair to `dictionary` every time we encounter a typo
during a code review, and we ensure that error will not happen again
anymore.
See: https://github.com/resin-io/etcher/pull/1084
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We recently encountered a UI regression caused by forgetting to commit
the generated CSS files.
The solution is to make the CI servers run `npm run sass` and check if
there are unstaged files afterwards. If so, the tests halt.
In order to avoid duplication between Travis CI and Appveyor CI, this
logic has been encoded into a bash script at `scripts/ci`.
See: https://github.com/resin-io/etcher/pull/1120
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Etcher checks what is the latest version by making an HTTP request to S3
in order to see if it should present the update notifier modal at
startup.
If the user is not connected to the internet, or is on an unstable
connection, the request might fail completely or timeout, leading to a
weird error message being presented to the user:
```json
{
"data": null,
"status": -1,
"config": {
"method": "GET",
"transformRequest": [null],
"transformResponse": [null],
"url": "https://resin-production-downloads.s3.amazonaws.com",
"headers": {
"Accept": "application/json, text/plain, */*"
}
},
"statusText": ""
}
```
To solve the error, we tweak `UpdateNotifierService.getLatestVersion()`
to resolve the current version if there was a problem making the request
(e.g: the response didn't come through at all), which after some
experimentation, we can check by comparing the `status` property with
`-1`.
This error happens in all operating systems, and currently is trending
on TrackJS.
Change-Type: patch
Changelog-Entry: Fix `transformRequest` error at startup when not connected to the internet, or when on an unstable connection.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
The `electron-installer-debian` is not needed for OS X builds. On top of
that, it seems that we're installing it twice.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This version fixes an `EACCES` issue when spawning the platform scripts
in OS X and GNU/Linux, which caused because previous versions were
published to NPM from Windows, and Windows seems to mess up the file
permissions (the execution bit in this particular case).
I'm not adding a changelog entry given this issue happen on `master` and
didn't affect any release.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Its not possible to build Etcher without it. For some reason, the Visual
Studio Community 2015 installer is not ticking it by default anymore.
See: https://github.com/resin-io/etcher/pull/1110
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Change-Type: patch
Changelog-Entry: Omit empty SD Card readers in the drive selector on Windows.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Looks like this dependency was not updated correctly on the shrinkwrap
file. Probably happened in the linked pull request, where the shrinkwrap
file was hand edited at some point (see PR discussion).
See: https://github.com/resin-io/etcher/pull/1083
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This version contains a fix to omit drive letters assigned to partitions
without a valid file system (read "valid for Windows"), causing our
unmounting routine to fail in these cases.
Change-Type: patch
Changelog-Entry: Fix "Error: Command Failed" error when unmounting on Windows.
Fixes: https://github.com/resin-io/etcher/issues/1019
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This PR creates a script at `scripts/html-lint.js` that runs a NodeJS
HTML linter package that understands AngularJS on top of all our HTML
templates.
The following error was detected and fixed:
```
1 errors at lib/gui/pages/finish/templates/success.tpl.html
[4:63] Duplicate attribute “class”.
```
This script will run as part of `npm run lint`, but you can call it
independently as `npm run htmllint`.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit adds a README file at `lib/shared/robot` explaining in
detail how the "robot" mechanism works, and why it is needed.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We revert the drive and image selection step order swap back from drive
selection first and image second, to image first and drive second.
See: https://github.com/resin-io/etcher/pull/1049
This commits introduces the following Windows rules:
- `electron-installer-zip`
- `electron-installer-nsis`
Other changes:
- Remove `scripts/build/windows.bat`
- Update `docs/RUNNING-LOCALLY.md` to point to Makefile
- Update `docs/PUBLISHING.md` to point to Makefile
- Remove `7z` from `docs/RUNNING-LOCALLY.md` pre-requisites
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This is a small step towards unifying all the modal skeletons that we
use through the application.
By moving the checkbox to the modal body we can declare the footer and
the header once in a single place.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
For better OS integration purposes.
This commit also fixes a bug where the dialog would be shown for some
milliseconds even if the application is not flashing.
Change-Type: minor
Changelog-Entry: Use a OS dialog to show the "exit while flashing" warning.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Angular 1.5 has a bug that causes angular's `$exceptionHandler`
to be called for rejected `$q` promises even if they have
a rejection handler. This bug caused duplicate error messages
in Etcher.
A consequence of upgrading to Angular 1.6 is that `$q` promises
without a rejection handler will throw `Possibly unhandled rejection`
errors. To avoid these errors, this commit moves code responsible
for opening a tooltip from the template to the controller and handles
the rejection.
Other packages upgraded:
- angular-moment to v1.0.1
- angular-ui-router to v0.4.2
- angular-mocks to v1.6.1
Change-type: patch
Changelog-Entry: Fix duplicate error messages
Fixes: https://github.com/resin-io/etcher/issues/1082
See: https://github.com/angular/angular.js/issues/7992
See: https://github.com/angular/angular.js/pull/13662
Currently Etcher will auto-select a system drive if its the only
available one when the "unsafe mode" is enabled, which doesn't feel
right.
Change-Type: patch
Changelog-Entry: Don't auto select system drives in unsafe mode.
See: https://github.com/resin-io/etcher/pull/1061
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
No one on the team is using this and the adaptor we're using proved to
be suboptimal. We might consider this again once we develop a good
Commitizen adapter integrated more closely with Versionist.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We match the main page design to its updated style.
* Remove help icon text.
* 'Change' image/drive buttons are now violet blue.
* Remove step number icons and accompanying descriptions.
* Flash progress button now turns into a striking orange, from blue.
Changelog-Entry: Update main page design to its new style.
This version doesn't throw an error if there is `stderr` output from the
scripts but the scripts exit with code zero.
Instead, the module prints the `stderr` output to a `debug` channel, so
we enable debug information by setting a `localStorage` value in order
to see what's going on.
Fixes: https://github.com/resin-io/etcher/issues/1034
Change-Type: patch
Changelog-Entry: Ignore `stderr` output from drive detection scripts if they exit with code zero.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Currently Etcher will allow you to flash an image to the same drive that
contains the image. As a way to protect against that case we introduce
the concept of a "source drive", which means a drive that contains the
source image.
This commit adds the following logic around this new concept:
- Don't auto-select a source drive
- De-select an already selected drive if an image inside it is selected
- Disable the drive in the drive selector modal
- Add a "Source Drive" badge to the drive in the drive selector modal
Fixes: https://github.com/resin-io/etcher/issues/830
Change-Type: minor
Changelog-Entry: Prevent flashing the drive where the source image is located.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
There are some npm versions that for some strange reason will attempt to
put *every* single development dependency in the `npm-shinkwrap.json`
file when editing the dependencies list.
This commit describes a workaround I've found to ensure only production
dependencies are added to the file.
I also renamed our `npm run shrinkwrap` script to `npm run
clean-shrinkwrap` since in some recent versions of npm, running `npm
shrinkwrap` will trigger our custom script instead of the original
implementation.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We have a test to ensure a drive is not auto-selected when its
protected, however the real functionality of this test was not being
tested given that the size the fake drive had was not enough to hold the
image.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This variable was renamed to `BUILD_TEMPORARY_DIRECTORY`, but the
Makefile silently expands this to nothing and carries on with the build.
Now that the variable is expanded correctly, we must add it as an
order-only prerequisite so it gets created.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This target would easily allow us to create a package for the
application without being wrapped into an installer, which is
particularly useful to provide custom builds, or test asar related
issues, for example.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Fixes: https://github.com/resin-io/etcher/issues/881
Change-Type: patch
Changelog-Entry: Capitalize every text throughout the application.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We currently attempt to read extra metadata from ZIP files, such as a
logo, image name, image url, etc. In order to simplify the metadata
story, we decided that this metadata will not live on the image itself,
but rather on a centralised repo, which greatly simplified our custom
archive extraction logic and allows us to make use of these nice
features even when streaming the image directly from the internet.
We'll be working on bringing back this functionality from a centralised
repo in subsequent commits.
Change-Type: major
Changelog-Entry: Remove extended archives metadata extraction logic.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
The `image-stream` module currently returns a readable stream, a
transform stream, a "size", and an optional "estimatedUncompressedSize".
Based on this information, its hard to say what "size" represents. Some
format handlers return the compressed size and provide a decompression
transform stream while others return the decompressed stream directly
and put the decompressed size in "size".
As a way to simplify this, every format handler now returns a "size"
object with the following properties:
- `original`: The original compressed size
- `final.estimated`: Whether the final size is an estimation or not
- `final.value`: The final uncompressed size
As a bonus, we extract the file size retrieval logic to
`imageStream.getFromFilePath()`, which is the onlt part where the
concept of a file should be referred to.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>