163 Commits

Author SHA1 Message Date
Alexis Svinartchouk
d494cee0da Don't spell check scripts
Change-type: patch
2019-11-05 18:36:01 +01:00
Lorenzo Alberto Maria Ambrosi
8df5d972fc Allow typescript files
Change-type: patch
Changelog-entry: Allow typescript files
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-08-05 16:31:50 +02:00
Lorenzo Alberto Maria Ambrosi
de5bee29ef Revert "Include sass in webpack configs"
This reverts commit 156c25cea19bc4a382bb7ce672304546ce476d37.

Change-type: patch
Changelog-entry: Revert "Include sass in webpack configs"
2019-05-28 19:34:12 +02:00
Lorenzo Alberto Maria Ambrosi
156c25cea1 Include sass in webpack configs
Change-type: patch
Changelog-entry: Include sass in webpack configs
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-05-28 11:08:54 +02:00
Lorenzo Alberto Maria Ambrosi
792fab20e6 Export NPM_VERSION variable in Makefile
Change-type: patch
Changelog-entry: Export NPM_VERSION variable in Makefile
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2019-04-30 16:14:26 +02:00
Alexis Svinartchouk
fc9282fff7 Remove versionist from dev dependencies
Change-type: patch
2019-03-20 16:13:38 +01:00
Alexis Svinartchouk
2e1763f19a Fix Makefile
Change-type: patch
2019-03-07 15:20:07 +01:00
Giovanni Garufi
90c8483df8 Remove lodash dependency in versionist.conf.js
Changelog-entry: Removed lodash dependency in versionist.conf.js
Change-type: patch
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
2019-02-22 13:30:49 +00:00
Alexis Svinartchouk
da072e7621 Remove etcher-cli
Change-type: major
2019-02-14 18:22:40 +01:00
Alexis Svinartchouk
6d79a8e23a Rebuild node-sass before using it
It avoids an error for x86 win32 builds on x64 platforms:
`Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x`

Change-type: patch
2019-02-11 12:06:27 +01:00
Alexis Svinartchouk
d5c9e6b054 Move patches back to patches folder
Change-type: patch
2019-01-28 14:53:29 +01:00
Alexis Svinartchouk
d4f29bd2af Hardcode electron_version in node-pre-gyp patch
Because it is not available in electron when running with
ELECTRON_RUN_AS_NODE=1

Change-type: patch
2019-01-28 13:07:38 +01:00
Alexis Svinartchouk
1d77b8dae7 Update node-pre-gyp patch and move it to another folder
To prevent the apply-patches script from doing stuff

Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
ac07c63631 update(etcher-sdk): Update etcher-sdk and shrinkwrap.json
Also update the node-pre-gyp patch (the directory has changed)

Change-type: patch
2019-01-24 13:21:27 +01:00
Jonas Hermsmeier
21f1f4e503 fix(test): Turn SDK integration tests for the GUI back on
Change-type: patch
2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
e68dbcf4ee Remove lib/sdk and its tests 2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
6143023502 Integrate etcher-sdk 2019-01-24 13:21:21 +01:00
Otavio Salvador
7565e809b0 Add .wic image extension as supported format
The `.wic` is a widely used image format in the OpenEmbedded / Yocto
Project ecosystem and is straightforward to be supported.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2018-11-27 10:01:05 -02:00
Alexis Svinartchouk
2158772e3b lint: don't run codespell on svg files
Change-type: patch
2018-11-13 14:55:45 +01:00
Juan Cruz Viotti
3855bb4d56 Use Resin CI scripts to build Etcher
Change-type: patch
Signed-off-by: Juan Cruz Viotti <juan@resin.io>
2018-10-22 14:58:15 +02:00
Michael Angelos Simos
2f4a7352d9 makefile: Update etcher deb/rpm publishing
Change-type: patch
Signed-off-by: Michael Angelos Simos <michalis@resin.io>
2018-09-27 16:19:25 +02:00
Juan Cruz Viotti
49edd1a6dc
Makefile: Don't use tilde in rpm versions
The tilde is not a valid version character in RPM packages, according to
the RPM source code.

Change-type: patch
Signed-off-by: Juan Cruz Viotti <juan@resin.io>
2018-09-24 16:42:14 +01:00
Jonas Hermsmeier
edf924d012
test(lint): Replace ASCII-only check with ESLint rule
This replaces the `ensure-all-text-files-only-ascii` sanity-check
with an ESLint rule to only check identifiers in code against being
printable ASCII, as there are places where UTF-8 in content is required,
which would make the previous check fail.

Change-Type: patch
2018-04-02 17:10:23 +02:00
Jonas Hermsmeier
3dd646485f
chore(package): Replace custom missing require check
This replaces the custom bash script with rules from the eslint-node plugin
to check for `require()`d modules that don't exist.
This will also check requires of local modules, and installed packages,
yielding a more thorough check.

Change-Type: patch
2018-03-28 18:49:32 +02:00
Andrew Scheller
ee93013220
chore: fixup 'distclean' rule to also delete generated directory (#2077)
Change-type: patch
2018-02-23 12:43:13 +00:00
Juan Cruz Viotti
677fc5aa68
chore: only publish production packages to Bintray (#2076)
The devel channels will be completely deprecated. The deb/rpm snapshot
builds will still be accessible through GitHub Releases as part of Resin
CI builds.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-02-23 11:47:11 +00:00
Jonas Hermsmeier
6990d7632a
fix(Makefile): Support arm64 / armv8 / aarch64
This adds support for 64bit arm cpu architectures.

Change-Type: patch
Changelog-Entry: Support building Etcher on armv8
2018-02-16 15:29:47 +01:00
Juan Cruz Viotti
4fa0f990e5
feat(GUI): bundle the GUI code with Webpack (#1943)
This commit introduces a Webpack configuration file that bundles the GUI
code along with its dependencies (except the Etcher SDK and its own
dependencies), and uses Babel to add support for JSX (required by the
Rendition library).

The GUI code that goes into the bundle was moved to `lib/gui/app` so we
can easily ignore the whole subdirectory when creating production
distributable packages.

We now have a new make target called `webpack` that can be used to
create the GUI bundle. Such target will be called everytime a package is
generated.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-02-15 17:39:15 +00:00
Benedict Aas
4dc64ee15b
feat(GUI): add app to gui folder structure (#2002)
* feat(GUI): add app to gui folder structure

We add a `lib/gui/app/` folder to help transition to Webpack usage.

Change-Type: patch
Changelog-Entry: Add `lib/gui/app` folder to ease into Webpack usage.
2018-01-29 18:34:21 +00:00
Juan Cruz Viotti
b357047e3a
chore: encode complete paths to patched file in patches/ (#1987)
So that the build system doesn't need to know in advance at which
directory the paths needs to be applied.

This will make it easier to add patches support to the Concourse
pipelines.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-23 18:48:35 -04:00
Juan Cruz Viotti
4d5c372832
chore: revise Concourse CI related npm scripts (#1977)
- The `concourse-dependencies` and `concourse-build-installers` scripts
are not necessary anymore, given that the Electron pipeline already
knows how to perform these tasks

- The `concourse-test` script will be renamed to
`concourse-test-electron` to include the pipeline name (electron), so a
single project can be served by more than one pipeline. I'll keep the
old `concourse-test` for a bit for backwards compatibility until all
Etcher PRs are rebased

- There is a new `concourse-test-node-cli` script that will be used by
the Node.js CLI pipeline

- There is a new `test-cli` target that is supposed to host CLI tests.
For now, it just runs the SDK tests in a Node.js environment (instead of
in Electron)

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-23 14:43:41 -04:00
Juan Cruz Viotti
9c624e8e52
chore: move updates disabling logic out of the Makefile (#1939)
The Makefile current has logic to disable updates when building deb or
rpm packages. To make the Concourse pipeline transition easier, the
logic that disables updates on deb and rpm has been moved to the main
application code.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-05 11:51:33 -04:00
Juan Cruz Viotti
a7ff5c4583
chore: re-organize files inside assets/ (second try) (#1952)
Change-Type: patch
See: https://github.com/resin-io/etcher/pull/1941
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-05 11:45:07 -04:00
Juan Cruz Viotti
2291321b46 refactor(GUI): remove the intermediate child writer proxy process (#1910)
Etcher currently elevates a child writer proxy that itself spawns the
Etcher CLI in robot mode, parses the output, and proxies those messages
to the GUI application over IPC.

After these set of changes, Etcher elevates a single child writer
process that directly communicates back with the GUI using IPC. The main
purpose behind these changes is to simplify the overall architecture and
fix various issues caused by the current complex child process tree.

Here's a summary of the changes:

- Stop wrapping the Etcher CLI to perform writing
- Remove the robot option from the Etcher CLI (along with related
  documentation)
- Elevate a new `child-write.js` standalone executable
- Move the relevant bits of `lib/child-writer` to the `image-writer` GUI
  module
- Remove the `lib/child-writer` directory
- Add a new "Child died unexpectedly" Mixpanel event
- Floor state percentage in the flash state model

The above changes made is possible to tackle all the remaining issues
where the writer process would remain alive even if the parent died.

Change-Type: patch
Changelog-Entry: Ensure the writer process dies when the GUI application is killed.
See: https://github.com/resin-io/etcher/pull/1873
See: https://github.com/resin-io/etcher/pull/1843
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-04 20:46:09 +01:00
Juan Cruz Viotti
52af3e8aa8
chore: re-organize files inside assets/ (#1941)
This is the file convention that Resin Concourse will use. I flattened
the directory for simplicity.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-02 08:11:43 -04:00
Juan Cruz Viotti
c586d9f54c
chore: get rid of npx (#1929)
We can live without it with a simple `PATH` trick at the top of the
Makefile (thanks @lurch!).

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-19 16:08:37 -04:00
Juan Cruz Viotti
f2c9404fc4
chore: setup a Spectron integration test suite (#1884)
- Add a `make test-spectron` target

- Install `spectron` and `mocha` (since we don't need to run the tests
  inside an Electron instance like in the case of `electron-mocha`)

- Add some example tests

Fixes: https://github.com/resin-io/etcher/issues/1870
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-13 13:51:16 -04:00
Juan Cruz Viotti
b74347d21f chore: pass a dictionary to codespell.py (#1717)
The `-` option loads the default dictionary.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-06 12:58:30 +00:00
Juan Cruz Viotti
856f53067b chore: revert "chore: don't zip AppImages" (#1842)
For usability purposes. We get a high volume of support requests from
GNU/Linux newbies that get deeply confused about setting execution
permissions.

This reverts commit b2d3d0ecb8eadd14593c3b7587775d1ac4b5475e.
2017-11-14 13:51:01 +01:00
Jonas Hermsmeier
e5d69465ab test(Makefile): Update codespell excludes (#1811)
This adds excludes for .dtb, .dtbo, .dat, .elf, .bin, .foo, and xz-without-extension
to reduce unnecessary warning output in `make lint`.

```
WARNING: Binary file: lib/blobs/usbboot/bcm2709-rpi-2-b.dtb
WARNING: Binary file: lib/blobs/usbboot/bcm2710-rpi-cm3.dtb
WARNING: Binary file: lib/blobs/usbboot/bcm2708-rpi-cm.dtb
WARNING: Binary file: lib/blobs/usbboot/bcm2708-rpi-b.dtb
WARNING: Binary file: lib/blobs/usbboot/bcm2710-rpi-3-b.dtb
WARNING: Binary file: lib/blobs/usbboot/bcm2708-rpi-0-w.dtb
WARNING: Binary file: lib/blobs/usbboot/bcm2708-rpi-b-plus.dtb
WARNING: Binary file: lib/blobs/usbboot/overlays/dwc2.dtbo
WARNING: Binary file: lib/blobs/usbboot/raspberrypi/fixup_cd.dat
WARNING: Binary file: lib/blobs/usbboot/raspberrypi/start_cd.elf
WARNING: Binary file: lib/blobs/usbboot/raspberrypi/bootcode.bin
WARNING: Binary file: tests/image-stream/data/unrecognized/xz-without-extension
WARNING: Binary file: tests/image-stream/data/unrecognized/xz-with-invalid-extension.foo
```

Change-Type: patch
2017-10-26 19:21:56 +02:00
Juan Cruz Viotti
70edfa384b chore: fix CLI packaging snapshot relative directory (#1713)
The current CLI releases are broken. Seems that `pkg` creates the
application snapshot based on the current working directory, so at the
moment, the snapshot gets created based on the root of the project,
rather than based on the dist/Etcher-cli-* directories, causing the
native add-ons to not be resolved correctly.

Fixes: https://github.com/resin-io/etcher/issues/1706
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-09-11 10:45:28 -04:00
Juan Cruz Viotti
f67f25bcdc chore: don't zip AppImages (#1703)
See: https://github.com/AppImage/AppImageKit/wiki/Creating-AppImages#common-mistake
See: https://github.com/resin-io/etcher/pull/772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-28 11:27:01 -04:00
Juan Cruz Viotti
488f281ec7 chore: build armhf on GNU/Linux (#1482)
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>
2017-08-28 11:26:36 -04: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
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
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
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
Andrew Scheller
bebedf1a50 chore: make distclean now deletes build directory too (#1624) 2017-07-24 13:12:46 -03:00