
`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>
2.1 KiB
Maintaining Etcher
This document is meant to serve as a guide for maintainers to perform common tasks.
Preparing a new version
-
Bump the version number in the
package.json
'sversion
property. -
Bump the version number in the
package.json
'sbuilder.win.version
-
Bump the version number in the
npm-shrinkwrap.json
'sversion
property. -
Add a new entry to
CHANGELOG.md
by runningnpm run changelog
. -
Re-take
screenshot.png
so it displays the latest version in the bottom right corner. -
Revise the
updates.semverRange
version inpackage.json
-
Commit the changes with the version number as the commit title, including the
v
prefix, tomaster
. For example:
git commit -m "v1.0.0" # not 1.0.0
- Create an annotated tag for the new version. The commit title should equal the annotated tag name. For example:
git tag -a v1.0.0 -m "v1.0.0"
- Push the commit and the annotated tag.
git push
git push --tags
Upgrading Electron
- Upgrade the
electron
dependency version inpackage.json
to an exact version (no~
,^
, etc).
Dealing with a problematic release
There can be times where a release is accidentally plagued with bugs. If you released a new version and notice the error rates are higher than normal, then revert the problematic release as soon as possible, until the bugs are fixed.
You can revert a version by deleting its builds from the S3 bucket and Bintray.
Refer to the Makefile
for the up to date information about the S3 bucket
where we push builds to, and get in touch with the resin.io operations team to
get write access to it.
The Etcher update notifier dialog and the website only show the a certain version if all the expected files have been uploaded to it, so deleting a single package or two is enough to bring down the whole version.
Use the following command to delete files from S3:
aws s3api delete-object --bucket <bucket name> --key <file name>
The Bintray dashboard provides an easy way to delete a version's files.