Skip to content

Commit c8c3a5b

Browse files
committed
dev: add version bump script
1 parent 84e003b commit c8c3a5b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

dev/bump_version.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/bash
2+
3+
set -e
4+
5+
if ! git diff --quiet; then
6+
echo "======================================="
7+
echo " Please clean up your dirty repo"
8+
echo "======================================="
9+
exit 1
10+
fi
11+
12+
read -p "set version to > " -r VERSION
13+
14+
if [[ $VERSION =~ ^v[0-9]+\.[0-9]+\.[0-9]$ ]]; then
15+
echo "valid version: $VERSION"
16+
else
17+
echo "Invalid semver specifier. Expected 'v0.0.0'"
18+
exit 1
19+
fi
20+
21+
# shellcheck disable=SC2001
22+
# Use sed, cause it's OK
23+
PACKAGE_VERSION=$(echo "$VERSION" | sed 's/^v//')
24+
eval "cd packages/pyright-scip/ && yarn version --no-git-tag-version --new-version $PACKAGE_VERSION"
25+
26+
git commit -am "bump version: $VERSION"
27+
git push
28+
29+
git tag -fa "$VERSION" -m "$VERSION"
30+
git push -f origin "$VERSION"

0 commit comments

Comments
 (0)