Skip to content

Commit e63d075

Browse files
Update documentation for release processes (#342)
* Update steps for crystal release process * Update steps for shards release process * Fix logic in `prepare-crystal-release.sh` * Use `${VERSION}` expansion
1 parent 20b98cc commit e63d075

File tree

3 files changed

+26
-23
lines changed

3 files changed

+26
-23
lines changed

processes/crystal-release.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ Add an issue `Crystal release X.Y.Z` in https://github.com/crystal-lang/distribu
2121
* (minor) Update language specification
2222
* (minor) Update compiler manual
2323
* (minor) Add or update guides / tutorials?
24-
7. [ ] Ensure that [test-ecosystem](https://github.com/crystal-lang/test-ecosystem) functions and succeeeds on master
24+
7. [ ] (minor) Look for library updates, check and document compatibility at https://crystal-lang.org/reference/man/required_libraries.html and in lib bindings
25+
8. [ ] Ensure that [test-ecosystem](https://github.com/crystal-lang/test-ecosystem) functions and succeeds on master
2526
* Run [*Test Crystal & Shards Workflow*](https://github.com/crystal-lang/test-ecosystem/actions/workflows/test-crystal-shards.yml)
2627

2728
## Release process (on ${RELEASE_DATE})
@@ -37,9 +38,9 @@ Add an issue `Crystal release X.Y.Z` in https://github.com/crystal-lang/distribu
3738
4. [ ] Smoke test with [test-ecosystem](https://github.com/crystal-lang/test-ecosystem)
3839
* Run [*Test Crystal & Shards Workflow*](https://github.com/crystal-lang/test-ecosystem/actions/workflows/test-crystal-shards.yml) with the release branch as `crystal_branch`.
3940
5. [ ] Merge the release PR
40-
6. [ ] Make the release and publish it on GitHub: [`../distribution-scripts/processes/scripts/make-crystal-release.sh`](https://github.com/crystal-lang/distribution-scripts/blob/master/processes/scripts/make-crystal-release.sh) (run from `crystallang/crystal@$VERSION` work tree). This performs these steps:
41+
6. [ ] Make the release and publish it on GitHub: [`../distribution-scripts/processes/scripts/make-crystal-release.sh`](https://github.com/crystal-lang/distribution-scripts/blob/master/processes/scripts/make-crystal-release.sh) (run from `crystallang/crystal@${VERSION}` work tree). This performs these steps:
4142
1. Tag & annotate the commit with the changelog using `<M.m.p>` pattern as version
42-
* `git tag -s -a -m $VERSION $VERSION`
43+
* `git tag -s -a -m ${VERSION} ${VERSION}`
4344
* `git push --tags`
4445
2. Publish Github release (https://github.com/crystal-lang/crystal/releases/new)
4546
* Copy the changelog section as description
@@ -51,27 +52,27 @@ Add an issue `Crystal release X.Y.Z` in https://github.com/crystal-lang/distribu
5152

5253
3. Publish build artifacts from CircleCI and GitHub Actions to GitHub release. For `URL_TO_CIRCLECI_ARTIFACT` grab the URL
5354
of any of the build artifacts in circleCI (doesn't matter which).
54-
* [ ] Upload build artifacts from CircleCI: [`../distribution-scripts/processes/scripts/publish-crystal-packages-on-github.sh $URL_TO_CIRCLECI_ARTIFACT`](https://github.com/crystal-lang/distribution-scripts/blob/master/processes/scripts/publish-crystal-packages-on-github.sh) (run from `crystallang/crystal@$VERSION` work tree)
55+
* [ ] Upload build artifacts from CircleCI: [`../distribution-scripts/processes/scripts/publish-crystal-packages-on-github.sh $URL_TO_CIRCLECI_ARTIFACT`](https://github.com/crystal-lang/distribution-scripts/blob/master/processes/scripts/publish-crystal-packages-on-github.sh) (run from `crystallang/crystal@${VERSION}` work tree)
5556
* `crystal-*-darwin-*.tar.gz`
5657
* `crystal-*-linux-*.tar.gz`
5758
* `crystal-*.pkg`
5859
* `crystal-*-docs.tar.gz`
5960
* [ ] Upload build artifacts from GHA (Windows):
60-
* `crystal-release.zip` -> `crystal-$VERSION-windows-x86_64-msvc-unsupported.zip`
61-
* `crystal-installer.zip` -> unzip -> `crystal-$VERSION-windows-x86_64-msvc-unsupported.exe`
61+
* `crystal-release.zip` -> `crystal-${VERSION}-windows-x86_64-msvc-unsupported.zip`
62+
* `crystal-installer.zip` -> unzip -> `crystal-${VERSION}-windows-x86_64-msvc-unsupported.exe`
6263
4. [ ] Push changes to OBS for building linux packages
6364
1. Checkout https://github.com/crystal-lang/distribution-scripts and go to [`./packages`](../packages)
6465
2. Configure build.opensuse.org credentials in environment variables:
6566
* `export OBS_USER=`
6667
* `export OBS_PASSWORD=`
67-
3. (minor) Update the `crystal` package: [`./obs-release.sh devel:languages:crystal crystal $VERSION`](../packages/obs-release.sh)
68+
3. (minor) Update the `crystal` package: [`./obs-release.sh devel:languages:crystal crystal ${VERSION}`](../packages/obs-release.sh)
6869
* (minor) Uses the docker image `crystallang/osc` to run the CLI client for OBS.
6970
* (minor) The script creates a branch in you home project, updates the version and pushes it back to OBS.
7071
* (minor) You can also run the commands from that file manually and check build locally with
7172
* (minor) `osc build xUbuntu_20.04 x86_64`
7273
* (minor) `osc build Fedora_Rawhide x86_64`
73-
4. (minor) Create the `crystal${VERSION%.*}` package: [`./obs-new-minor.sh devel:languages:crystal crystal${VERSION%.*} $VERSION crystal${OLD_VERSION%.*}`](../packages/obs-new-minor.sh)
74-
4. (patch) Update the `crystal${VERSION%.*}` package: [`./obs-release.sh devel:languages:crystal crystal${VERSION%.*} $VERSION`](../packages/obs-release.sh)
74+
4. (minor) Create the `crystal${VERSION%.*}` package: [`./obs-new-minor.sh devel:languages:crystal crystal${VERSION%.*} ${VERSION} crystal${OLD_VERSION%.*}`](../packages/obs-new-minor.sh)
75+
4. (patch) Update the `crystal${VERSION%.*}` package: [`./obs-release.sh devel:languages:crystal crystal${VERSION%.*} ${VERSION}`](../packages/obs-release.sh)
7576
5. Now OBS builds the packages. It’s best to follow the build status in the browser:
7677
1. `open https://build.opensuse.org/project/show/home:$OBS_USER:branches:devel:langauges:crystal/crystal`
7778
1. Wait for all package build jobs to finish and succeed
@@ -82,14 +83,8 @@ Add an issue `Crystal release X.Y.Z` in https://github.com/crystal-lang/distribu
8283
* Versioned docker images have been pushed to dockerhub.
8384
* Now just assign the `latest` tags:
8485
* `./docker/apply-latest-tags.sh ${VERSION}`
85-
6. [ ] Publish snap package (you can use the docker image `snapcore/snapcraft` for running the following commands)
86-
1. `docker run --pull=always --rm -it snapcore/snapcraft`
87-
1. You need to logged in via `snapcraft login`
88-
2. Recent tagged release is published directly to edge channel. The CI logs the snap revision number. Otherwise the .snap file is in the artifacts.
89-
3. Check the current status to find the revision of the tagged release otherwise:
90-
4. `snapcraft status crystal`
91-
5. `snapcraft release crystal <revision-number> beta`
92-
6. `snapcraft release crystal <revision-number> stable`
86+
6. [ ] Publish snap package
87+
- On https://snapcraft.io/crystal/releases promote the `latest/edge` release to `latest/beta` and then `latest/stable`
9388
7. [ ] Check PR for homebrew: https://github.com/Homebrew/homebrew-core/pulls?q=is%3Apr+crystal+sort%3Aupdated-desc
9489
* It should've been automatically created
9590

processes/scripts/prepare-crystal-release.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,22 @@ case $VERSION in
3737
;;
3838
esac
3939

40+
if [ $# -lt 2 ]; then
41+
printf "Scheduled release date: "
42+
read RELEASE_DATE
43+
else
44+
RELEASE_DATE=$2
45+
fi
46+
4047
if [ "$TYPE" != "patch" ]; then
4148
if [ $# -lt 3 ]; then
42-
printf "Scheduled release date: "
43-
read RELEASE_DATE
44-
4549
printf "Freeze period begin: "
4650
read FREEZE_PERIOD
4751
else
48-
RELEASE_DATE=$2
4952
FREEZE_PERIOD=$3
5053
fi
54+
else
55+
FREEZE_PERIOD=""
5156
fi
5257

5358
dist_scripts_root=$(dirname $(dirname $(dirname $(realpath $0))))

processes/shards-release.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ Add an issue `Shards release ${VERSION}` in https://github.com/crystal-lang/dist
44

55
## Release preparation
66

7-
1. [ ] Start preparing changelog and release notes
8-
2. [ ] Publish release PR draft
7+
1. [ ] Prepare the changelog entry: [`crystal-lang/crystal/scripts/github-changelog.cr crystal-lang/shards ${VERSION}`](https://github.com/crystal-lang/crystal/blob/master/scripts/github-changelog.cr)
8+
* Ensure that all merged PRs are added to the milestone (check [`is:pr is:merged sort:updated-desc no:milestone`](https://github.com/crystal-lang/shards/pulls?q=is%3Apr+is%3Amerged+sort%3Aupdated-desc+no%3Amilestone+-label%3Astatus%3Areverted+base%3Amaster+merged%3A%3E%3D2023-01-01)).
9+
* Ensure that all milestoned PRs are properly labelled (check [`is:pr is:merged sort:updated-desc no:label milestone:${VERSION}`](https://github.com/crystal-lang/shards/pulls?q=is%3Apr+is%3Amerged+sort%3Aupdated-desc+milestone%3A${VERSION}+no%3Alabel)).[ ] Start preparing changelog and release notes
10+
2. [ ] Prepare release notes (typically published with Crystal)
11+
3. [ ] Publish release PR draft
912
* It should be populated with updates to `CHANGELOG.md`, `VERSION`, and `shard.yml`.
1013

1114
## Release process

0 commit comments

Comments
 (0)