-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c145ba9
commit 5e3217a
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Update shards release. | ||
# | ||
# Usage: | ||
# | ||
# scripts/update-shards.sh [<version>] | ||
# | ||
# This helper script pulls the latest Shards release from GitHub and updates all | ||
# references to the shards release in this repository. | ||
# | ||
# See Crystal release checklist: https://github.com/crystal-lang/distribution-scripts/blob/master/processes/shards-release.md#post-release | ||
|
||
set -eux | ||
|
||
SHARDS_VERSION=${1:-} | ||
if [ -z "$SHARDS_VERSION" ]; then | ||
# fetch latest release from GitHub | ||
SHARDS_VERSION=$(gh release view --repo crystal-lang/shards --json tagName --jq .tagName | cut -c 2-) | ||
fi | ||
|
||
# Update shards ref in mingw64 and win-msvc build actions | ||
sed -i "/repository: crystal-lang\/shards/{n;s/ref: .*/ref: ${shards_version}/}" .github/workflows/mingw-w64.yml .github/workflows/win_build_portable.yml |