3027 Commits

Author SHA1 Message Date
Ștefan Daniel Mihăilă
4604e89b4f chore: add aknowledge->acknowledge to codespell dictionary 2017-02-28 11:45:29 -04:00
Juan Cruz Viotti
311dcd27a8 chore: add missing : after options in publish scripts (#1134)
Not including the colon means that the option parsing mechanism is not
expecting an argument for the `-t` and the `-p` option (for
`bintray-debian.sh` and `aws-s3.sh` respectively), and thus `$OPTARG`
will be undefined.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-27 17:06:02 -04:00
Juan Cruz Viotti
8d71307831 chore: define S3_BUCKET in Makefile (#1141)
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>
2017-02-27 17:05:58 -04:00
Juan Cruz Viotti
2ebef51d38 chore: don't use symbolic links on Windows builds (#1133)
Cygwin can't resolve them correctly, causing cryptic errors during
build.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-27 10:09:04 -04:00
Juan Cruz Viotti
d9bd509d22 chore: fix various code-signing Windows issues (#1135)
- 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>
2017-02-27 10:08:44 -04:00
Juan Cruz Viotti
be001cc266
v1.0.0-beta.19
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
v1.0.0-beta.19
2017-02-24 15:15:14 -04:00
Ștefan Daniel Mihăilă
5b9104e8aa feat(GUI): warn when atempting to burn Windows images (#1043)
Change-Type: minor
Changelog-Entry: Show warning when user tries to flash a Windows image
Closes: https://github.com/resin-io/etcher/issues/1035
2017-02-24 15:12:03 -04:00
Juan Cruz Viotti
d845cccff5 upgrade: drivelist to v5.0.14 (#1130)
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>
2017-02-24 10:51:40 -04:00
Juan Cruz Viotti
810e3a085b chore: add execution permissions to Windows bash scripts (#1131)
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>
2017-02-24 10:51:31 -04:00
Juan Cruz Viotti
0db335c8f1 chore: start codespell dictionary file in the root of the project (#1087)
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>
2017-02-23 14:56:43 -04:00
Juan Cruz Viotti
96a9b65ea7 chore: ensure npm run sass was ran and the results committed (#1121)
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>
2017-02-23 11:20:47 -04:00
Juan Cruz Viotti
f4c92676a9 fix(GUI): update notifier transformRequest error at startup (#1122)
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>
2017-02-23 11:20:10 -04:00
Juan Cruz Viotti
389102af62 chore: don't install electron-installer-debian in OS X builds (#1129)
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>
2017-02-22 20:46:37 -04:00
Juan Cruz Viotti
b6c6e94448 upgrade: drivelist to v5.0.13 (#1123)
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>
2017-02-22 15:46:25 -04:00
Juan Cruz Viotti
c3e7e07532 docs: group CLI developer oriented documentation at lib/cli/README.md (#1105)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-21 17:43:25 -04:00
Juan Cruz Viotti
9aa23c1590 docs: add developer documentation to the lib/image-stream module (#1107)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-21 17:43:10 -04:00
Juan Cruz Viotti
2f153479da docs: C++ are not auto-selected by Visual Studio anymore (#1112)
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>
2017-02-21 08:12:48 -04:00
Juan Cruz Viotti
d002ed164b docs: document supported operating systems and versions (#1114)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-21 08:12:30 -04:00
Benedict Aas
295585fb06 feat(gui): new flashing step icon (#1119)
We update the flashing step's icon to the new lightning strike icon.

Changelog-Type: Update flashing step's icon to a lightning strike.
2017-02-21 08:12:09 -04:00
Benedict Aas
78ff320d98 minifix: re-build css (#1120) 2017-02-21 08:11:50 -04:00
Juan Cruz Viotti
d9a92a63ee upgrade: drivelist to v5.0.11 (#1117)
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>
2017-02-20 09:26:11 -04:00
Benedict Aas
7adb5b5485 feat(GUI): update image step icon (#1118)
We replace the old image step with the more general 'plus' icon.

Changelog-Entry: Update the image step icon with an hexagonal "plus" icon.
2017-02-20 09:03:55 -04:00
Juan Cruz Viotti
9e80f154f0 chore: update angular-ui-router in npm-shrinkwrap.json (#1102)
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>
2017-02-16 13:51:15 -04:00
Juan Cruz Viotti
98f8c3f87f upgrade: drivelist to v5.0.10 (#1101)
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>
2017-02-16 13:50:53 -04:00
Juan Cruz Viotti
cf4dc5ff37 refactor(GUI): remove component-drive-selector-body outdated class (#1072)
The rules inside this class should be moved to
`.modal-drive-selector-modal`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-13 14:59:29 -04:00
Juan Cruz Viotti
a60f7134fc chore: add an HTML linter and fix its warnings (#1077)
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>
2017-02-13 14:58:29 -04:00
Juan Cruz Viotti
43c08d1547 docs: explain the "robot" module in a high level way (#1081)
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>
2017-02-10 11:59:23 -04:00
Benedict Aas
db8f7d0862 refactor(gui): revert drive/image selection step order swap (#1086)
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
2017-02-10 11:59:01 -04:00
Juan Cruz Viotti
f4d9c8e7c4 docs: add msys-zip as a required Windows dependency (#1080)
We need this dependency to create ZIP packages on Windows.
2017-02-09 14:30:53 -04:00
Juan Cruz Viotti
108a43512d chore: add support for Windows builds in Makefile (#1079)
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>
2017-02-09 14:30:39 -04:00
Juan Cruz Viotti
79ea4d4983 docs: clarify that a "style" commit type applies to code annotations (#1085)
See: https://github.com/resin-io/etcher/pull/1084
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-09 11:30:39 -04:00
Juan Cruz Viotti
6bdba5ffd4 style(GUI): move update notifier checkbox inside modal body (#1071)
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>
2017-02-09 11:30:19 -04:00
Benedict Aas
838f3cc50d minifix: re-build css (#1088) 2017-02-09 11:29:57 -04:00
Juan Cruz Viotti
b55ff3eef8 style(GUI): use a OS dialog to show the "exit while flashing" warning (#1070)
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>
2017-02-08 10:04:45 -04:00
Ștefan Daniel Mihăilă
92fdba3642 upgrade: angular to v1.6.1; angular-ui-bootstrap to v2.5.0 (#1083)
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
2017-02-07 19:12:32 -04:00
Ștefan Daniel Mihăilă
f4c6597b3d style(GUI): minor fixes in comments (#1084) 2017-02-07 17:31:30 -04:00
Juan Cruz Viotti
05fdd5cc29 refactor(GUI): unify modal body styles (#1073)
- Remove unnecessary `.modal-text` wrapper
- Move drive selector specific styles to `_drive-selector.scss`

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-07 16:14:15 -04:00
Juan Cruz Viotti
70c7ddc52a fix(GUI): don't auto select system drives in unsafe mode
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>
2017-02-07 13:34:07 -04:00
Juan Cruz Viotti
53ea89782c chore: get rid of commitizen
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>
2017-02-07 13:33:52 -04:00
Shou
048aac5ac2 feat(gui): update main page design
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.
2017-02-07 12:21:45 -04:00
Juan Cruz Viotti
c7d4ac6518 upgrade: drivelist to v5.0.9
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>
2017-02-06 14:53:38 -04:00
Juan Cruz Viotti
8e5840ce69 chore: integrate codespell and fix existing spelling issues
This tool scans the comments of every source file and reports back
spelling errors.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-06 14:53:20 -04:00
Juan Cruz Viotti
95d4f2f608 fix(GUI): prevent flashing the drive where the source image is located
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>
2017-02-06 14:53:08 -04:00
Juan Cruz Viotti
16340b412a doc: workaround to npm shrinkwrap development dependencies bug
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>
2017-02-06 14:52:40 -04:00
Juan Cruz Viotti
ea95177e94 test(GUI): fix non-running test in DrivesModel test suite (#1061)
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>
2017-01-30 10:03:24 -04:00
Juan Cruz Viotti
0187cb0b2d upgrade: drivelist to v5.0.8 (#1060)
Change-Type: patch
Changelog-Entry: Fix 'MySQL' is not recognised as an internal or external command error on Windows.
See: https://github.com/resin-io-modules/drivelist/issues/133
Fixes: https://github.com/resin-io/etcher/issues/1025
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-30 10:03:04 -04:00
Juan Cruz Viotti
f0020d9fcf chore: fix undefined TEMPORARY_DIRECTORY variable (#1059)
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>
2017-01-27 18:01:56 -04:00
Juan Cruz Viotti
7c50f3e742 chore: add a package Makefile target (#1058)
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>
2017-01-27 13:14:15 -04:00
Juan Cruz Viotti
4f621f6ae3 style(GUI): capitalize every text for consitency purposes (#1056)
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>
2017-01-27 11:08:49 -04:00
Juan Cruz Viotti
fd9d3ce749
Revert "refactor: remove extended archives extra functionality (#1055)"
This reverts commit b78473ea0ebd76233217fb4f236bb34be635da90.
2017-01-26 18:36:33 -04:00