* refactor(scripts): Update clean-shrinkwrap script
This updates the `postshrinkwrap` script to traverse the dependency tree
and remove all `from` fields to avoid inconsistent diffs across platforms,
environments and installs when shrinkwrapping anew.
* chore(shrinkwrap): Update npm-shrinkwrap.json
* fix(scripts): Ensure `resolved` field in shrinkwrap is HTTPS
* fix(scripts): Only strip "from" of registry packages
* fix(clean-shrinkwrap): Fix linter errors
* chore(shrinkwrap): Update npm-shrinkwrap.json
* fix(scripts): fix spelling typo
Change-Type: patch
We do this by using Appveyor's `platform` configuration variable instead
of always running on x64 and cross-compiling to x86.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This works around the "Cannot fetch index base URL http://pypi.python.org/simple/"
error by installing pip==9.0.1 directly from the pypi.python.org/packages/
Change-Type: patch
We show a progress bar for any drive objects with a `progress` field
that isn't falsy, e.g. `undefined` or `0`.
Changelog-Type: minor
Changelog-Entry: Add optional progress bars to drive-selector drives.
This commit installs `node-usb` v1.3.0 from GitHub, since that version
was never published to NPM, and is the only one that works with Visual
Studio 2015 (see https://github.com/tessel/node-usb/issues/109).
The usbboot communicates with a Raspberry Pi / Amber through USB and
eventually mounts it as a block device we can write to.
This feature bundles bootcode.bin and start.elf from the original
usbboot implementation.
The flow is the following:
- On each scan, the usbboot scanner will try to get a usbboot compatible
USB device to the next "phase", until they are all transformed to
block devices the user can flash to as usual
Change-Type: minor
Changelog-Entry: Integrate Raspberry Pi's usbboot technology.
Fixes: https://github.com/resin-io/etcher/issues/1541
See: https://github.com/raspberrypi/usbboot
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit makes use of the `resin/armv7hf-debian` Docker image to
test and generate armhf builds.
We needed to add a slash before `build` in `.gitignore` given that git
was refusing to include any changes on `scripts/build` otherwise.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
- 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>
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>
- 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>
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>
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>
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>
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>
- Homebrew now auto-updates before performing any installation, which
can take quite some time. We can disable this by enabling
HOMEBREW_NO_AUTO_UPDATE
- We can pass the --force-bottle option to `brew install` to force it to
download pre-compiled binaries, and don't attempt any compilations
See: https://github.com/resin-io/etcher/pull/1582
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on
browserify + node-static-entry-point with pkg, an open source tool to
package Node.js applications for distribution.
Some highlights:
- Removing browserify got rid of a lot of dependencies from
npm-shrinkwrap.json
- pkg currently has an issue where macOS binaries can't be code-signed
(https://github.com/zeit/pkg/issues/128), therefore this commit
comments-out the binary signing section for that operating system
- pkg currently has an issue where Windows binaries can't be branded
(https://github.com/zeit/pkg/issues/149), therefore this commit
comments-out the branding section for that operating system
See: https://github.com/zeit/pkg
Fixes: https://github.com/resin-io/etcher/issues/1531
Fixes: https://github.com/resin-io/etcher/issues/1450
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This dependency comes bundled with electron-builder, so there is no
reason to install it separately.
See: https://github.com/resin-io/etcher/pull/1582
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
As part of our CI sanity checks, we run `npm ls`, to ensure we don't
have any extraneous dependencies (the command fails if so), however by
its own definition, `npm ls` prints the whole dependency tree, which
spams the builds.
This commit redirects stdout to /dev/null, which contains the dependency
tree, but still prints and extraneous dependency warning, which is
printed to stderr instead.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
If we include a platform specific optional dependency in the shrinkwrap
file, then npm will insist in installing it even if the platform doesn't
match. As a solution, we figured out we can avoid putting this platform
specific optional dependencies in the npm-shrinkwrap.json file.
In order to do this, we currently have a script called
`clean-shrinkwrap.js` that runs *before* any `npm shrinkwrap` file (its
a `preshrinkwrap` npm script) that deletes all the platform specific
modules we know about using `npm rm`.
The problem with this approach is that `npm rm` will remove the module's
code from `node_modules`, which means that if we run `npm shrinkwrap`,
we will lose certain optional dependencies, that may be needed at a
later stage.
The solution is to modify the `clean-shrinkwrap.js` script to parse
`npm-shrinkwrap.json`, and manually delete the entries that we want to
omit. Also, the script needs to be run *after* `npm shrinkwrap`, so we
change the npm script name to `postshrinkwrap`.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
CI servers fail with timeouts, or network issues quite frequently,
requiring maintainers to manually restart failed builds.
Hopefully these npm settings will help mitigating these issues.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
We currently support portable builds that are basically ZIPs containing
the main Etcher executable and all its related libraries.
Turns out `electron-builder` supports NSIS-based portable builds that
can create a single executable that has everything it needs to run,
including any external assets.
This commit makes use of this new portable Windows installer
functionality, replacing the old ZIP approach.
Change-Type: patch
Changelog-Entry: Generate single-binary portable installers on Windows.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
We've been using `electron-builder` v2 all this time to create the NSIS
installer. This commit upgrade `electron-builder` to v18.6.2, and keeps
using it just to create the NSIS installer (for now).
The final package behaves exactly like the one we have before, just that
we needed various tweaks to upgrade to the latest `electron-builder`
version.
In more detail:
- Inject data to package.json using the new `--extraMetadata` option
- Remove old `.builder` package.json property
- Change the author of the project to Resin Inc. (the company name used
in our code-signing certificate)
As an extra, the new NSIS installer allows the user to install the
application to any location, and fixes the fact that the previous
installer copied the application to C:\Program Files (x86) even on x64
systems.
Change-Type: patch
Fixes: https://github.com/resin-io/etcher/issues/1030
Fixes: https://github.com/resin-io/etcher/issues/877
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Etcher supports disabling the update notification dialog by setting the
`ETCHER_DISABLE_UPDATES` environment variable.
In order to simplify disabling updates for when these are managed by a
package manager (e.g. in a debian package), this removes support for the
`ETCHER_DISABLE_UPDATES` environment variable, and instead requires
packagers to tweak the `updates.enabled` property of the package.json
file, which is set to `true` by default.
We don't want to encourage end users to disable the update mechanism, so
the documention was removed from `USER-DOCUMENTATION.md`. This option
will remain as something only packagers should tweak.
Change-Type: minor
Changelog-Entry: Remove support for the `ETCHER_DISABLE_UPDATES` environment variable.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
* add support for rpm packages.
* remove bintray file not my place neither do i have the keys.
* Remove last visage of publishing rpm's to bintray.
* address review comments.
* remove electron installer redhat from optional dependancies and add it to dockerfiles. also remove variable ELECTRON-INSTALLER-REDHAT inline with electron installer debian script.
* Add dependancy on libXScrnSaver and remove unsupported fields from config.json.
add rpm package to dockerfiles.
add dependancy check on rpmbuild to installer script.
* change dependancy from lsb-core-noarch to just lsb.
* address review comments.
* Add bintray target for rpm packages.
* Fix missing dependancy removed during conflict resolution.
We currently have various npm script target, and some of them are
getting complex enough that making sense out of them in package.json is
not a trivial task.
This commit moves all npm targets that are not directly recognisable by
npm (like `start`, `test`, `preshrinkwrap`, etc) into the Makefile.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
We're not using this development dependency anymore. Furthermore, we're
also not using the `packageignore.js` script, which was meant to be used
with `electron-packager`.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Resin.io already publishes multi-arch Docker base images running Jessie,
which is Debian version we wanted before falling back to Ubuntu 12.04.
The main reason behind this change is to be able to use other resin.io
base images (like ARM ones) without requiring a lot of per-base-image
changes.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We encountered a Browserify bug when releasing the CLI, where absolute
paths would be hard-coded in the final bundle. Since we were in the
middle of a release process, we added a quick and dirty
search-and-replace workaround on `concatenate-javascript.sh`.
After the release, we submitted a PR to Browserify which fixes the
issue. This commit makes use of my personal fork to be able to use such
fix while it gets merged to the main project.
See: https://github.com/substack/node-browserify/pull/1725
See: https://github.com/resin-io/etcher/pull/1409
Fixes: https://github.com/resin-io/etcher/issues/1429
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Currently we have almost equal CI scripts implemented in bash (for
Travis), and batch (for Appveyor). This commit takes advantage of MinGW
bash to unify all the scripts as bash scripts.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We're currently hardcoding various pip dependencies in
`appveyor-install.bat` and `travis-install.sh`.
This commit moves all the dependencies to a `requirements.txt` file in
the root of the project, and makes every install script run `pip install
-r requirements.txt`.
See: https://github.com/resin-io/etcher/pull/1401#discussion_r116547053
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This allows us to catch changes that break our installer builds before
merging the problematic changes.
As a way to simplify the CI configuration files, this commit introduces
an `installers-all` Makefile target that builds all installers.
This commit also replaces all the `cp -rf` calls with `cp -RLf` in
Makefile to avoid some weird hard link Appveyor issues.
See: https://github.com/resin-io/etcher/pull/1078
See: https://github.com/resin-io/etcher/pull/1354
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
There are various problems that contributed to this issue:
- `node-pre-gyp` doesn't detect the 6.10.3 node version. We reverted to
6.1.0, which the module recognised, and which shares the same v8 ABI
- Passing `--force` to `npm install` causes npm to swallow any errors
and silently continue
- The x86 Docker container has problems writing to `$HOME/.node-gyp`.
The solution is to enable `unsafe-perm` given that the container is
running as `root`
Fixes: https://github.com/resin-io/etcher/issues/1444
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>