Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions scripts/update-shards.sh
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