Skip to content

Commit 2cf693c

Browse files
Update shards release process (#279)
1 parent f19a334 commit 2cf693c

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

processes/scripts/prepare-shards-release.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,24 @@
1212
set -eu
1313

1414
if [ $# -lt 1 ]; then
15-
echo "Usage: $0 VERSION"
16-
exit 1
17-
fi
15+
printf "Release version: "
16+
read VERSION
1817

19-
VERSION=$1
18+
if [ -z "$VERSION" ]; then
19+
echo "Usage: $0 VERSION"
20+
exit 1
21+
fi
22+
else
23+
VERSION=$1
24+
fi
2025

2126
. $(dirname $(realpath $0))/functions.sh
2227

28+
if [[ ! "$VERSION" =~ ^[0-9] ]]; then
29+
echo "Invalid VERSION: ${VERSION}"
30+
exit 1
31+
fi
32+
2333
case $VERSION in
2434
*.0.0)
2535
TYPE=major
@@ -48,5 +58,7 @@ case $TYPE in
4858
;;
4959
esac
5060

61+
body=$(echo "$body" | sed -E "s/\\$\{VERSION\}/$VERSION/g")
62+
5163
body=$(printf "%q" "$body")
5264
step "Create tracking issue in crystal-lang/distribution-scripts" gh issue create -R crystal-lang/distribution-scripts --body "$body" --label "release" --title \"Release Shards $VERSION\"

processes/shards-release.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Shards release process checklist
22

3-
Add an issue `Shards release X.Y.Z` in https://github.com/crystal-lang/distribution-scripts/issues with a copy of this document. In this way it's easy to track the progress of the release (*Helper script: [`scripts/prepare-shards-release.sh`](./scripts/prepare-shards-release.sh)*)
3+
Add an issue `Shards release ${VERSION}` in https://github.com/crystal-lang/distribution-scripts/issues with a copy of this document. In this way it's easy to track the progress of the release (*Helper script: [`scripts/prepare-shards-release.sh`](./scripts/prepare-shards-release.sh)*)
44

55
## Release preparation
66

@@ -15,14 +15,15 @@ Add an issue `Shards release X.Y.Z` in https://github.com/crystal-lang/distribut
1515
1. [ ] Finalize the release PR
1616
* Make sure all changes are mentioned in the changelog
1717
* Check release date
18-
* Build man files with the release date: `$ make clean docs SOURCE_DATE_EPOCH=$(gdate -d "YYYY-MM-DD" +"%s")`
18+
* Build man files with the release date: `$ make clean docs SOURCE_DATE_EPOCH=$(gdate -ud "YYYY-MM-DD" +"%s")`
1919
* Un-draft the PR
2020
2. [ ] (minor) Split off release branch (`release/x.y`)
2121
3. [ ] Smoke test with [test-ecosystem](https://github.com/crystal-lang/test-ecosystem)
2222
* Run [*Test Crystal & Shards Workflow*](https://github.com/crystal-lang/test-ecosystem/actions/workflows/test-crystal-shards.yml) with the release branch as `shards_branch`.
2323
4. [ ] Merge the release PR
2424
5. [ ] Tag & annotate the commit with the changelog using v`<M.m.p>` pattern as {version}
25-
* `git tag -s -a -m v$VERSION v$VERSION`
25+
* `git tag -s -a -m v${VERSION} v${VERSION}`
26+
* `git push --tags`
2627
6. [ ] Publish Github release (https://github.com/crystal-lang/shards/releases/new)
2728
* Copy the changelog section as description
2829
7. [ ] Close milestone (https://github.com/crystal-lang/shards/milestones)
@@ -34,7 +35,7 @@ Add an issue `Shards release X.Y.Z` in https://github.com/crystal-lang/distribut
3435
* Edit [linux/Makefile](../linux/Makefile)
3536
* Edit [omnibus/config/software/shards.rb](../omnibus/config/software/shards.rb)
3637
3. [ ] Update https://github.com/crystal-lang/crystal
37-
* Edit [`.github/workflows/win.yml`](https://github.com/crystal-lang/crystal/blob/master/.github/workflows/win.yml)
38+
* Edit [`.github/workflows/win_build_portable.yml`](https://github.com/crystal-lang/crystal/blob/master/.github/workflows/win_build_portable.yml)
3839
3. [ ] Submit a PR to update the homebrew formula in https://github.com/Homebrew/homebrew-core/blob/master/Formula/crystal.rb . Or do it on Crystal release.
3940
4. [ ] Update default base version in test-ecosystem
4041
6. [ ] (minor) Perform uncomment/todos left in the repo

0 commit comments

Comments
 (0)