From 614af55522ea1959be540d9ffb236a7bb0d9d369 Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Mon, 18 Jan 2021 17:31:56 -0500 Subject: [PATCH 1/9] Show commands in script/version-bump.sh --- script/version-bump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/version-bump.sh b/script/version-bump.sh index 13087dd75b..b028961e2f 100755 --- a/script/version-bump.sh +++ b/script/version-bump.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -# set -o xtrace +set -o xtrace # Increment the version to a SNAPSHOT and update the changelog From 520a7e88530fd4801d886884ec05c2c6e12964fd Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Mon, 18 Jan 2021 17:32:16 -0500 Subject: [PATCH 2/9] Add script to package release Broken out of script/release --- script/release-pkg.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 script/release-pkg.sh diff --git a/script/release-pkg.sh b/script/release-pkg.sh new file mode 100755 index 0000000000..8a07ffa8f4 --- /dev/null +++ b/script/release-pkg.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +set -euo pipefail + +set -o xtrace + +# Package a release and tag the commit + +# The directory of this file +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +# shellcheck source=./shared.sh +. "$DIR"/shared.sh + +msg=$(git show -s --format=%s HEAD) + +if ! [[ "$msg" != "[release] ${VERSION}" ]] +then + echo "error: HEAD commit must be a [release] commit" + echo "found: ${msg}" + exit 4 +fi + +release="mod-distribution/target/apalache-pkg-${VERSION}-full.jar" + +if [ ! -f "$release" ]; then + echo "Release file not found: $release" + exit 3 +fi + +# TODO remove echos +echo git tag -a "v${VERSION}" -m "$msg" +echo git push -tags + +# overwrite the build number +BUILD=$(git describe --tags) + +ZIPF="apalache-${BUILD}.zip" +TGZF="apalache-${BUILD}.tgz" + +zip -r "$ZIPF" bin/apalache-mc "$release" +tar zpcf "$TGZF" bin/apalache-mc "$release" From 12f89b50644eaf57989e4f809601c2c1876d520d Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Mon, 18 Jan 2021 17:32:57 -0500 Subject: [PATCH 3/9] Github workflow to cut release --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..c6ea3f3383 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: release + +on: + push: + branches: unstable + # This file only changes when we've prepared a new release + paths: ./RELEASE-NOTES.md + +jobs: + cut-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Cut Release + run: | + git config --global user.name "$GITHUB_ACTOR" + git config --global user.email "github@actions.ci" + cit checkout HEAD~1 + ./script/release-pgk.sh From 3be96c537bdfcd652d247ca394232420b9f4ea81 Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Mon, 18 Jan 2021 17:33:31 -0500 Subject: [PATCH 4/9] Github workflow to prepare release --- .github/workflows/prepare-release.yml | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/prepare-release.yml diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml new file mode 100644 index 0000000000..a452b72a2e --- /dev/null +++ b/.github/workflows/prepare-release.yml @@ -0,0 +1,37 @@ +name: Prepare Release + +on: + push: + branches: + - shon/releases-via-ci + pull_request: + branches: + - shon/releases-via-ci + # FIXME + # workflow_dispatch: + # inputs: + # release_version: + # description: "Version to release" + # required: false + # default: "" + # schedule: + # # * is a special character in YAML so you have to quote this string + # # Automatically prepares a minor version release every Monday + # - cron: "* * * * 1" + +jobs: + prepare-release: + env: + RELEASE_VERSION: 0.0.0-testing-release-ci + # RELEASE_VERSION: ${{ github.event.inputs.release_version }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-java@v1 + with: + java-version: 1.8 + - run: | + git config --global user.name "$GITHUB_ACTOR" + git config --global user.email "github@actions.ci" + ./script/release-prepare.sh From 7533db6217dc2a3c58c91239d2ebadbcb8dad291 Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Tue, 19 Jan 2021 08:40:41 -0500 Subject: [PATCH 5/9] Create a pull request in release-prepare.sh Allows us to have an even more github actions independent workflow. --- script/release-prepare.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/script/release-prepare.sh b/script/release-prepare.sh index 7257858d4b..3c0a3b6a35 100755 --- a/script/release-prepare.sh +++ b/script/release-prepare.sh @@ -32,6 +32,18 @@ fi git checkout -b "release/${RELEASE_VERSION}" RELEASE_VERSION=$RELEASE_VERSION "$DIR"/release-notes.sh +# Make the release commit +commit_msg="[release] ${RELEASE_VERSION}" git add --update git add "$RELEASE_NOTES" -git commit -m "[release] ${RELEASE_VERSION}" +git commit -m "$commit_msg" + +body=$(cat "$RELEASE_NOTES") +pr_msg=$(printf "%s\n\n%s" "$commit_msg" "$body") + +# Bump the version +"$DIR"/version-bump.sh + +# Open a pull request for the release +# See https://hub.github.com/hub-pull-request.1.html +hub pull-request --message="$pr_msg" --push --base="unstable" From 2ead610b0582ff44ecf75b27f6d75be635b3dcb5 Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Tue, 19 Jan 2021 08:42:57 -0500 Subject: [PATCH 6/9] Document changes to release-prepare.sh --- CONTRIBUTING.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c4d701a316..78bbab43de 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -235,24 +235,27 @@ Changes for a given release should be split between the five sections: ## Releases -You must have release-me installed and configured with a token. See -https://pypi.org/project/release-me/ +### Requirements -Assuming the current version recorded in the project's `pom.xml` files is -`l.m.n-SNAPSHOT`, the manual release process is as follows: +- [release-me](https://pypi.org/project/release-me/) installed and configured with a token +- [hub](https://github.com/github/hub) installed + - With a `GITHUB_TOKEN` variable in your shell environment holding an access + token with repo permissions (you can use the same token as for + `release-me`). ### Prepare the release +Assuming the current version recorded in the project's `pom.xml` files is +`l.m.n-SNAPSHOT`, the manual release process is as follows: + - [ ] `git checkout unstable && git pull` - [ ] Run `./script/release-prepare.sh` to - create and checkout a branch `release/l.m.n`. - prepare and add a release commit `[release] l.m.n` -- [ ] Run `./script/version-bump.sh` to - update the changelog - bump the version number - commit the changes -- [ ] Open a PR merging the newly created branch into `unstable`, with the title - `[release] l.m.n`. + - opens a pr into `unstable` with the title `[release] l.m.n`. - [ ] Get the PR reviewed and merged and **DO NOT SQUASH THE CHANGES** on merge. If you need to set a specific version (e.g., to increment to a major version), From 8ee95322f37e64fe1845def9c57ea49ac238a086 Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Tue, 19 Jan 2021 09:48:29 -0500 Subject: [PATCH 7/9] [release] 0.0.0-release-test --- RELEASE-NOTES.md | 21 +++++++++++++++++++++ UNRELEASED.md | 19 ------------------- mod-distribution/pom.xml | 4 ++-- mod-infra/pom.xml | 4 ++-- mod-tool/pom.xml | 4 ++-- pom.xml | 2 +- tla-assignments/pom.xml | 4 ++-- tla-bmcmt/pom.xml | 4 ++-- tla-import/pom.xml | 4 ++-- tla-pp/pom.xml | 4 ++-- tla-types/pom.xml | 4 ++-- tlair/pom.xml | 4 ++-- 12 files changed, 40 insertions(+), 38 deletions(-) create mode 100644 RELEASE-NOTES.md diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md new file mode 100644 index 0000000000..ad4bdeb30d --- /dev/null +++ b/RELEASE-NOTES.md @@ -0,0 +1,21 @@ +## 0.0.0-release-test + +### Bug fixes + + * critical bugfix in unique renaming, #429 + +### Features + + * opt-in for statistics collection (shared with TLC and TLA+ Toolbox), see #288 + +### Architecture + + * new layer of TransitionExecutor (TRex), see `at.forsyte.apalache.tla.bmcmt.trex.*` + +### Documentation + + * Compile the manuals into [a static + site](http://informalsystems.github.io/apalache/docs/) using + [mdBook](https://github.com/rust-lang/mdBook), see #400 + * Description of top-level user operators, see #419 + * ADR003: [Architecture of TransitionExecutor](./docs/internal/adr/003adr-trex.md) diff --git a/UNRELEASED.md b/UNRELEASED.md index f69f07df4a..ea6361545c 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -10,22 +10,3 @@ * Another change description, see #124 DO NOT LEAVE A BLANK LINE BELOW THIS PREAMBLE --> -### Bug fixes - - * critical bugfix in unique renaming, #429 - -### Features - - * opt-in for statistics collection (shared with TLC and TLA+ Toolbox), see #288 - -### Architecture - - * new layer of TransitionExecutor (TRex), see `at.forsyte.apalache.tla.bmcmt.trex.*` - -### Documentation - - * Compile the manuals into [a static - site](http://informalsystems.github.io/apalache/docs/) using - [mdBook](https://github.com/rust-lang/mdBook), see #400 - * Description of top-level user operators, see #419 - * ADR003: [Architecture of TransitionExecutor](./docs/internal/adr/003adr-trex.md) diff --git a/mod-distribution/pom.xml b/mod-distribution/pom.xml index 899d2a097f..8161de3da5 100644 --- a/mod-distribution/pom.xml +++ b/mod-distribution/pom.xml @@ -8,11 +8,11 @@ at.forsyte.apalache apalache - 0.8.1-SNAPSHOT + 0.0.0-release-test apalache-pkg - 0.8.1-SNAPSHOT + 0.0.0-release-test pom apalache-pkg diff --git a/mod-infra/pom.xml b/mod-infra/pom.xml index 3bcb4877a4..42fc7dbbc5 100644 --- a/mod-infra/pom.xml +++ b/mod-infra/pom.xml @@ -4,11 +4,11 @@ at.forsyte.apalache apalache - 0.8.1-SNAPSHOT + 0.0.0-release-test infra - 0.8.1-SNAPSHOT + 0.0.0-release-test jar infra diff --git a/mod-tool/pom.xml b/mod-tool/pom.xml index cc0ba0c710..53ae4fcecf 100644 --- a/mod-tool/pom.xml +++ b/mod-tool/pom.xml @@ -4,14 +4,14 @@ at.forsyte.apalache apalache - 0.8.1-SNAPSHOT + 0.0.0-release-test tool - 0.8.1-SNAPSHOT + 0.0.0-release-test jar tool diff --git a/pom.xml b/pom.xml index 8ba03ac679..17df978c5a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ at.forsyte.apalache apalache pom - 0.8.1-SNAPSHOT + 0.0.0-release-test APALACHE project https://github.com/informalsystems/apalache diff --git a/tla-assignments/pom.xml b/tla-assignments/pom.xml index 1f87009906..2cb2a4032e 100644 --- a/tla-assignments/pom.xml +++ b/tla-assignments/pom.xml @@ -3,11 +3,11 @@ at.forsyte.apalache apalache - 0.8.1-SNAPSHOT + 0.0.0-release-test tla-assignments - 0.8.1-SNAPSHOT + 0.0.0-release-test jar tla-assignments diff --git a/tla-bmcmt/pom.xml b/tla-bmcmt/pom.xml index 8974989e4f..0c304d86d5 100644 --- a/tla-bmcmt/pom.xml +++ b/tla-bmcmt/pom.xml @@ -4,11 +4,11 @@ at.forsyte.apalache apalache - 0.8.1-SNAPSHOT + 0.0.0-release-test tla-bmcmt - 0.8.1-SNAPSHOT + 0.0.0-release-test jar tla-bmcmt diff --git a/tla-import/pom.xml b/tla-import/pom.xml index afe294ce54..1dc1a239d1 100644 --- a/tla-import/pom.xml +++ b/tla-import/pom.xml @@ -4,11 +4,11 @@ at.forsyte.apalache apalache - 0.8.1-SNAPSHOT + 0.0.0-release-test tla-import - 0.8.1-SNAPSHOT + 0.0.0-release-test jar tla-import diff --git a/tla-pp/pom.xml b/tla-pp/pom.xml index bcdc7e06b6..e20f92f0e7 100644 --- a/tla-pp/pom.xml +++ b/tla-pp/pom.xml @@ -4,11 +4,11 @@ at.forsyte.apalache apalache - 0.8.1-SNAPSHOT + 0.0.0-release-test tla-pp - 0.8.1-SNAPSHOT + 0.0.0-release-test jar tla-pp diff --git a/tla-types/pom.xml b/tla-types/pom.xml index c4cd68449e..54075f3e0d 100644 --- a/tla-types/pom.xml +++ b/tla-types/pom.xml @@ -3,11 +3,11 @@ at.forsyte.apalache apalache - 0.8.1-SNAPSHOT + 0.0.0-release-test tla-types - 0.8.1-SNAPSHOT + 0.0.0-release-test jar tla-types diff --git a/tlair/pom.xml b/tlair/pom.xml index 85dcec5ba8..496b860a9b 100644 --- a/tlair/pom.xml +++ b/tlair/pom.xml @@ -4,11 +4,11 @@ at.forsyte.apalache apalache - 0.8.1-SNAPSHOT + 0.0.0-release-test tlair - 0.8.1-SNAPSHOT + 0.0.0-release-test jar tlair From a2ed27f41ce97a2955de0a15a395766ab33acd3c Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Tue, 19 Jan 2021 09:48:33 -0500 Subject: [PATCH 8/9] Update changelog for version 0.0.0-release-test --- CHANGES.md | 22 ++++++++++++++++++++++ RELEASE-NOTES.md | 21 --------------------- 2 files changed, 22 insertions(+), 21 deletions(-) delete mode 100644 RELEASE-NOTES.md diff --git a/CHANGES.md b/CHANGES.md index 59ef6e8f18..c9d9542d52 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,28 @@ This file is generated. Do not write release notes here. Notes for unreleased changes go in ./UNRELEASED.md --> +## 0.0.0-release-test + +### Bug fixes + + * critical bugfix in unique renaming, #429 + +### Features + + * opt-in for statistics collection (shared with TLC and TLA+ Toolbox), see #288 + +### Architecture + + * new layer of TransitionExecutor (TRex), see `at.forsyte.apalache.tla.bmcmt.trex.*` + +### Documentation + + * Compile the manuals into [a static + site](http://informalsystems.github.io/apalache/docs/) using + [mdBook](https://github.com/rust-lang/mdBook), see #400 + * Description of top-level user operators, see #419 + * ADR003: [Architecture of TransitionExecutor](./docs/internal/adr/003adr-trex.md) + ## 0.8.0 [RELEASE] * use openjdk-9 for deterministic Apalache Docker images, see #318 diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md deleted file mode 100644 index ad4bdeb30d..0000000000 --- a/RELEASE-NOTES.md +++ /dev/null @@ -1,21 +0,0 @@ -## 0.0.0-release-test - -### Bug fixes - - * critical bugfix in unique renaming, #429 - -### Features - - * opt-in for statistics collection (shared with TLC and TLA+ Toolbox), see #288 - -### Architecture - - * new layer of TransitionExecutor (TRex), see `at.forsyte.apalache.tla.bmcmt.trex.*` - -### Documentation - - * Compile the manuals into [a static - site](http://informalsystems.github.io/apalache/docs/) using - [mdBook](https://github.com/rust-lang/mdBook), see #400 - * Description of top-level user operators, see #419 - * ADR003: [Architecture of TransitionExecutor](./docs/internal/adr/003adr-trex.md) From 893239fdab602db51b5fa14e4ab5888d13a2a4bf Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Tue, 19 Jan 2021 09:48:41 -0500 Subject: [PATCH 9/9] Bump version to 0.0.1-release-test-SNAPSHOT --- mod-distribution/pom.xml | 4 ++-- mod-infra/pom.xml | 4 ++-- mod-tool/pom.xml | 4 ++-- pom.xml | 2 +- tla-assignments/pom.xml | 4 ++-- tla-bmcmt/pom.xml | 4 ++-- tla-import/pom.xml | 4 ++-- tla-pp/pom.xml | 4 ++-- tla-types/pom.xml | 4 ++-- tlair/pom.xml | 4 ++-- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/mod-distribution/pom.xml b/mod-distribution/pom.xml index 8161de3da5..b27559adc5 100644 --- a/mod-distribution/pom.xml +++ b/mod-distribution/pom.xml @@ -8,11 +8,11 @@ at.forsyte.apalache apalache - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT apalache-pkg - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT pom apalache-pkg diff --git a/mod-infra/pom.xml b/mod-infra/pom.xml index 42fc7dbbc5..baf4660033 100644 --- a/mod-infra/pom.xml +++ b/mod-infra/pom.xml @@ -4,11 +4,11 @@ at.forsyte.apalache apalache - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT infra - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT jar infra diff --git a/mod-tool/pom.xml b/mod-tool/pom.xml index 53ae4fcecf..d688b3683e 100644 --- a/mod-tool/pom.xml +++ b/mod-tool/pom.xml @@ -4,14 +4,14 @@ at.forsyte.apalache apalache - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT tool - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT jar tool diff --git a/pom.xml b/pom.xml index 17df978c5a..ef36924448 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ at.forsyte.apalache apalache pom - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT APALACHE project https://github.com/informalsystems/apalache diff --git a/tla-assignments/pom.xml b/tla-assignments/pom.xml index 2cb2a4032e..336d39fcae 100644 --- a/tla-assignments/pom.xml +++ b/tla-assignments/pom.xml @@ -3,11 +3,11 @@ at.forsyte.apalache apalache - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT tla-assignments - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT jar tla-assignments diff --git a/tla-bmcmt/pom.xml b/tla-bmcmt/pom.xml index 0c304d86d5..ab52ce8eb1 100644 --- a/tla-bmcmt/pom.xml +++ b/tla-bmcmt/pom.xml @@ -4,11 +4,11 @@ at.forsyte.apalache apalache - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT tla-bmcmt - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT jar tla-bmcmt diff --git a/tla-import/pom.xml b/tla-import/pom.xml index 1dc1a239d1..e2123beaf0 100644 --- a/tla-import/pom.xml +++ b/tla-import/pom.xml @@ -4,11 +4,11 @@ at.forsyte.apalache apalache - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT tla-import - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT jar tla-import diff --git a/tla-pp/pom.xml b/tla-pp/pom.xml index e20f92f0e7..45539704ad 100644 --- a/tla-pp/pom.xml +++ b/tla-pp/pom.xml @@ -4,11 +4,11 @@ at.forsyte.apalache apalache - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT tla-pp - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT jar tla-pp diff --git a/tla-types/pom.xml b/tla-types/pom.xml index 54075f3e0d..3be9345606 100644 --- a/tla-types/pom.xml +++ b/tla-types/pom.xml @@ -3,11 +3,11 @@ at.forsyte.apalache apalache - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT tla-types - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT jar tla-types diff --git a/tlair/pom.xml b/tlair/pom.xml index 496b860a9b..84c34cc905 100644 --- a/tlair/pom.xml +++ b/tlair/pom.xml @@ -4,11 +4,11 @@ at.forsyte.apalache apalache - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT tlair - 0.0.0-release-test + 0.0.1-release-test-SNAPSHOT jar tlair