
`etcher-latest-version` was kept in a separate repository in order to re-use it with the Etcher website, however the Etcher website is not using it at all, and we're moving towards having the website in the main repository. Therefore, this commit brings back the logic from `etcher-latest-version`, but introduces it as `lib/shared/s3-packages.js`, in order to not tie ourselves to the AngularJS framework, and as a step towards the Etcher SDK. As a nice little bonus, this commit adds support for an `ETCHER_FAKE_S3_LATEST_VERSION` environment variable that can be used to trick Etcher that there is an available update, and therefore show the update notifier modal. Also, this commit adds support for snapshot builds update-checks, by checking the `resin-nightly-downloads` S3 bucket if the current version contains a git commit hash build number. If the version is not a production release, then the update notifier modal doesn't present the checkbox to disable update notifications for X days. We also add a property called `updates.semverRange` to `package.json`, which can be used to fine control which versions are considered as candidates for an update notification. This commit adds a setting called `includeUnstableChannel`, which can be used to tweak whether unstable (beta) releases are considered or not when checking for the latest available version. See: https://github.com/resin-io-modules/etcher-latest-version Fixes: https://github.com/resin-io/etcher/issues/953 Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
4.4 KiB
Publishing Etcher
This is a small guide to package and publish Etcher to all supported operating systems.
Release Types
Etcher supports production and snapshot release types. Each is
published to a different S3 bucket, and production release types are code
signed, while snapshot release types aren't and include a short git commit-hash
as a build number. For example, 1.0.0-beta.19
is a production release type,
while 1.0.0-beta.19+531ab82
is a snapshot release type.
In terms of comparison: 1.0.0-beta.19
(production) < 1.0.0-beta.19+531ab82
(snapshot) < 1.0.0-rc.1
(production) < 1.0.0-rc.1+7fde24a
(snapshot) <
1.0.0
(production) < 1.0.0+2201e5f
(snapshot). Keep in mind that if you're
running a production release type, you'll only be prompted to update to
production release types, and if you're running a snapshot release type, you'll
only be prompted to update to other snapshot release types.
The build system creates (and publishes) snapshot release types by default, but
you can build a specific release type by setting the RELEASE_TYPE
make
variable. For example:
make <target> RELEASE_TYPE=snapshot
make <target> RELEASE_TYPE=production
We can control the version range a specific Etcher version will consider when
showing the update notification dialog by tweaking the updates.semverRange
property of package.json
.
Update Channels
Etcher has a setting to include the unstable update channel. If this option is
set, Etcher will consider both stable and unstable versions when showing the
update notifier dialog. Unstable versions are the ones that contain a beta
pre-release tag. For example:
- Production unstable version:
1.4.0-beta.1
- Snapshot unstable version:
1.4.0-beta.1+7fde24a
- Production stable version:
1.4.0
- Snapshot stable version:
1.4.0+7fde24a
Signing
OS X
-
Get our Apple Developer ID certificate for signing applications distributed outside the Mac App Store from the resin.io Apple account.
-
Install the Developer ID certificate to your Mac's Keychain by double clicking on the certificate file.
The application will be signed automatically using this certificate when packaging for OS X.
Windows
-
Get access to our code signing certificate and decryption key as a resin.io employee by asking for it from the relevant people.
-
Place the certificate in the root of the Etcher repository naming it
certificate.p12
.
Packaging
The resulting installers will be saved to release/out
.
Run the following commands:
OS X
make electron-installer-dmg
make electron-installer-app-zip
GNU/Linux
make electron-installer-appimage
make electron-installer-debian
Windows
make electron-installer-zip
make electron-installer-nsis
Publishing to Bintray
We publish GNU/Linux Debian packages to Bintray.
Make sure you set the following environment variables:
BINTRAY_USER
BINTRAY_API_KEY
Run the following command:
make publish-bintray-debian
Publishing to S3
Make sure you have the AWS CLI tool installed and configured to access resin.io's production or snapshot S3 bucket.
Run the following command to publish all files for the current combination of platform and arch (building them if necessary):
make publish-aws-s3
Also add links to each AWS S3 file in GitHub Releases. See
v1.0.0-beta.17
as an example.
Publishing to Homebrew Cask
-
Update
Casks/etcher.rb
with the new version andsha256
-
Send a PR with the changes above to
caskroom/homebrew-cask
Announcing
Post messages to the Etcher forum and Etcher gitter channel announcing the new version of Etcher, and including the relevant section of the Changelog.