From 82a16ee41fba90eb69e6223e60a2de9eb710c761 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 18 Oct 2016 13:41:57 +0900 Subject: [PATCH 1/7] document the electron release process --- docs/development/releasing.md | 61 +++++++++++++++++++++++++++++++++++ package.json | 2 ++ 2 files changed, 63 insertions(+) create mode 100644 docs/development/releasing.md diff --git a/docs/development/releasing.md b/docs/development/releasing.md new file mode 100644 index 00000000000..92d6a969a6f --- /dev/null +++ b/docs/development/releasing.md @@ -0,0 +1,61 @@ +# Releasing + +This document describes the process for releasing a new version of Electron. + +## Compile release notes + +The current process is to maintain a local file, keeping track of notable changes as pull requests are merged. For examples of how to format the notes, see previous releases on [the releases page]. + +## Create a temporary branch (optional) + +If there is any change to the build configuration, use a temporary branch with any name (e.g. `release`). Otherwise you can use `master`. + +## Bump the version + +Run the `bump-release` script, passing `major`, `minor`, or `patch` as an argument: + +```sh +npm run bump-release -- patch +``` + +This will bump the version number in a number of files. See [this bump commit] for an example. + +Most releases will be `patch`-level. Upgrades to Chrome or other major changes should use `minor`. For more info, see [electron-versioning]. + +## Edit the release draft + +1. Visit [the releases page] and you'll see a new draft release with placeholder release notes. +1. Edit the release and add release notes. +1. Click 'Save draft'. **Do not click 'Publish release'!** +1. Wait for all the builds to pass. :hourglass_flowing_sand: + +## Merge temporary branch + +If you created a temporary release branch, merge it back into master, without creating a merge commit: + +```sh +git merge release master --no-commit +``` + +## Run local debug build + +Run local debug build to verify that you are actually building the version you want. Sometimes you thought you were doing a release for a new version, but you're actually not. + +```sh +npm run build +npm start +``` + +Verify the window is displaying the current updated version. + +## Publish the release + +This script will download the binaries and generate the node headers and the .lib linker used on Windows by node-gyp to build native modules. + +```sh +npm run release +``` + +[the releases page]: https://github.com/electron/electron/releases +[this bump commit]: https://github.com/electron/electron/commit/78ec1b8f89b3886b856377a1756a51617bc33f5a +[electron-versioning]: /docs/tutorial/electron-versioning.md diff --git a/package.json b/package.json index 980b78f68ce..4da2cbb919d 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "scripts": { "bootstrap": "python ./script/bootstrap.py", "browserify": "browserify", + "bump-release": "./script/bump-release.py", "build": "python ./script/build.py -c D", "clean": "python ./script/clean.py", "coverage": "npm run instrument-code-coverage && npm test -- --use-instrumented-asar", @@ -38,6 +39,7 @@ "lint-api-docs-js": "standard-markdown docs && standard-markdown docs-translations", "lint-api-docs": "electron-docs-linter docs/api --version=$npm_package_version --outfile=out/electron-api.json", "preinstall": "node -e 'process.exit(0)'", + "release": "./script/upload.py -p", "repl": "python ./script/start.py --interactive", "start": "python ./script/start.py", "test": "python ./script/test.py" From 6b207d65bf1404778c02853bd52b239b7f684f34 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 18 Oct 2016 14:04:52 +0900 Subject: [PATCH 2/7] update releasing --- docs/development/releasing.md | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/docs/development/releasing.md b/docs/development/releasing.md index 92d6a969a6f..b968878e2ef 100644 --- a/docs/development/releasing.md +++ b/docs/development/releasing.md @@ -6,9 +6,17 @@ This document describes the process for releasing a new version of Electron. The current process is to maintain a local file, keeping track of notable changes as pull requests are merged. For examples of how to format the notes, see previous releases on [the releases page]. -## Create a temporary branch (optional) +## Create a temporary branch -If there is any change to the build configuration, use a temporary branch with any name (e.g. `release`). Otherwise you can use `master`. +Create a new branch from `master` named `release`. + +```sh +git checkout master +git pull +git checkout -b release +``` + +This branch is created as a precaution to prevent any merged PRs from sneaking into a release between the time the temporary release branch is created and the CI builds are complete. ## Bump the version @@ -18,9 +26,9 @@ Run the `bump-release` script, passing `major`, `minor`, or `patch` as an argume npm run bump-release -- patch ``` -This will bump the version number in a number of files. See [this bump commit] for an example. +This will bump the version number in several files. See [this bump commit] for an example. -Most releases will be `patch`-level. Upgrades to Chrome or other major changes should use `minor`. For more info, see [electron-versioning]. +Most releases will be `patch` level. Upgrades to Chrome or other major changes should use `minor`. For more info, see [electron-versioning]. ## Edit the release draft @@ -31,12 +39,21 @@ Most releases will be `patch`-level. Upgrades to Chrome or other major changes s ## Merge temporary branch -If you created a temporary release branch, merge it back into master, without creating a merge commit: +Merge the temporary back into master, without creating a merge commit: ```sh git merge release master --no-commit ``` +If this fails, rebase with master and rebuild: + +```sh +git pull +git checkout release +git rebase master +git push origin HEAD +``` + ## Run local debug build Run local debug build to verify that you are actually building the version you want. Sometimes you thought you were doing a release for a new version, but you're actually not. @@ -56,6 +73,14 @@ This script will download the binaries and generate the node headers and the .li npm run release ``` +## Delete the temporary branch + +```sh +git checkout master +git branch -D release # delete local branch +git push origin :release # delete remote branch +``` + [the releases page]: https://github.com/electron/electron/releases [this bump commit]: https://github.com/electron/electron/commit/78ec1b8f89b3886b856377a1756a51617bc33f5a [electron-versioning]: /docs/tutorial/electron-versioning.md From 7a73c0189f38b6dbf83611e33dd1fe8e5622d48a Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Wed, 19 Oct 2016 11:40:40 +0900 Subject: [PATCH 3/7] bump-release -> bump-version --- docs/development/releasing.md | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/development/releasing.md b/docs/development/releasing.md index b968878e2ef..6eca9831c03 100644 --- a/docs/development/releasing.md +++ b/docs/development/releasing.md @@ -20,10 +20,10 @@ This branch is created as a precaution to prevent any merged PRs from sneaking i ## Bump the version -Run the `bump-release` script, passing `major`, `minor`, or `patch` as an argument: +Run the `bump-version` script, passing `major`, `minor`, or `patch` as an argument: ```sh -npm run bump-release -- patch +npm run bump-version -- patch ``` This will bump the version number in several files. See [this bump commit] for an example. diff --git a/package.json b/package.json index 4da2cbb919d..560b48421e3 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "scripts": { "bootstrap": "python ./script/bootstrap.py", "browserify": "browserify", - "bump-release": "./script/bump-release.py", + "bump-version": "./script/bump-version.py", "build": "python ./script/build.py -c D", "clean": "python ./script/clean.py", "coverage": "npm run instrument-code-coverage && npm test -- --use-instrumented-asar", From 3a44663003d22e3b0d680d04e3ea7adbea0b6776 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 20 Oct 2016 11:19:18 +0900 Subject: [PATCH 4/7] Add note about setting $ELECTRON_GITHUB_TOKEN --- docs/development/releasing.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/development/releasing.md b/docs/development/releasing.md index 6eca9831c03..a7e64305ef3 100644 --- a/docs/development/releasing.md +++ b/docs/development/releasing.md @@ -43,6 +43,7 @@ Merge the temporary back into master, without creating a merge commit: ```sh git merge release master --no-commit +git push origin master ``` If this fails, rebase with master and rebuild: @@ -65,6 +66,12 @@ npm start Verify the window is displaying the current updated version. +## Set `$ELECTRON_GITHUB_TOKEN` + +Create a personal access token with "repo" scope, and set it in your environment as `ELECTRON_GITHUB_TOKEN`. + +You will only need to do this once. + ## Publish the release This script will download the binaries and generate the node headers and the .lib linker used on Windows by node-gyp to build native modules. From b0fb0c64922c15ffc87aff454de2de1d9ec1524b Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 20 Oct 2016 11:22:32 +0900 Subject: [PATCH 5/7] Document S3 creds --- docs/development/releasing.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/development/releasing.md b/docs/development/releasing.md index a7e64305ef3..e85bfe972af 100644 --- a/docs/development/releasing.md +++ b/docs/development/releasing.md @@ -66,9 +66,14 @@ npm start Verify the window is displaying the current updated version. -## Set `$ELECTRON_GITHUB_TOKEN` +## Set environment variables -Create a personal access token with "repo" scope, and set it in your environment as `ELECTRON_GITHUB_TOKEN`. +You'll need to set the following environment variables to publish a release. Ask another team member for these credentials. + +- `$ELECTRON_S3_BUCKET` +- `$ELECTRON_S3_ACCESS_KEY` +- `$ELECTRON_S3_SECRET_KEY` +- `$ELECTRON_GITHUB_TOKEN` - A personal access token with "repo" scope. You will only need to do this once. From 88b288502a726a4a3e6ed96718328157ec204883 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 20 Oct 2016 11:29:02 +0900 Subject: [PATCH 6/7] Add note about Python HTTPS warning --- docs/development/releasing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/development/releasing.md b/docs/development/releasing.md index e85bfe972af..7fbdcf324b5 100644 --- a/docs/development/releasing.md +++ b/docs/development/releasing.md @@ -85,6 +85,8 @@ This script will download the binaries and generate the node headers and the .li npm run release ``` +Note: Many distributions of Python still ship with old HTTPS certificates. You may see a `InsecureRequestWarning`, but it can be disregarded. + ## Delete the temporary branch ```sh From 63267031e95c40884be661c2e8079637fba1575c Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 20 Oct 2016 11:30:36 +0900 Subject: [PATCH 7/7] =?UTF-8?q?=E2=9D=8C=20=F0=9F=92=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/development/releasing.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/development/releasing.md b/docs/development/releasing.md index 7fbdcf324b5..5abeac4580a 100644 --- a/docs/development/releasing.md +++ b/docs/development/releasing.md @@ -70,10 +70,10 @@ Verify the window is displaying the current updated version. You'll need to set the following environment variables to publish a release. Ask another team member for these credentials. -- `$ELECTRON_S3_BUCKET` -- `$ELECTRON_S3_ACCESS_KEY` -- `$ELECTRON_S3_SECRET_KEY` -- `$ELECTRON_GITHUB_TOKEN` - A personal access token with "repo" scope. +- `ELECTRON_S3_BUCKET` +- `ELECTRON_S3_ACCESS_KEY` +- `ELECTRON_S3_SECRET_KEY` +- `ELECTRON_GITHUB_TOKEN` - A personal access token with "repo" scope. You will only need to do this once.