Skip to content

Commit a5d1e01

Browse files
committed
chore: add release script
1 parent 62820f1 commit a5d1e01

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

scripts/release.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Usage: ./scripts/release.sh <major|minor|patch>
3+
set -ex
4+
5+
if [ $# -ne 1 ]; then
6+
echo "Usage: ./release.sh <major|minor|patch>"
7+
exit 1
8+
fi
9+
10+
# Fail if there are any unstaged changes left
11+
git diff --exit-code
12+
13+
cargo workspaces version $1
14+
NEW_VERSION=$(cargo workspaces ls --json | jq -r '.[] | select(.name == "codspeed") | .version')
15+
cargo workspaces publish --from-git
16+
gh release create v$NEW_VERSION --title "v$NEW_VERSION" --generate-notes -d

0 commit comments

Comments
 (0)