We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e1e277 commit 12a303dCopy full SHA for 12a303d
1 file changed
scripts/release.sh
@@ -35,6 +35,12 @@ if ! [[ "$NEW_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
35
fi
36
MAJOR_VERSION=$(echo "$NEW_VERSION" | cut -d. -f1)
37
38
+# Check if this version has already been released (local tag, remote tag, or GitHub release)
39
+if git tag -l "v$NEW_VERSION" | grep -q . || git ls-remote --tags origin "refs/tags/v$NEW_VERSION" | grep -q . || gh release view "v$NEW_VERSION" > /dev/null 2>&1; then
40
+ echo "Error: v$NEW_VERSION has already been released."
41
+ exit 1
42
+fi
43
+
44
# Determine release notes strategy
45
RUNNER_NOTES=$(gh release view "v$NEW_VERSION" -R CodSpeedHQ/codspeed --json body | jq -r .body)
46
RELEASE_NOTES="$RUNNER_NOTES
0 commit comments