Skip to content

Commit

Permalink
guard against duplicate tags
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh committed Sep 2, 2024
1 parent 3ced167 commit 8e4c9e2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ set -e
TAG=$(python -c 'from olmo_core.version import VERSION; print("v" + VERSION)')

git pull

# Make sure tag/release doesn't already exist.
STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" "https://github.com/allenai/OLMo-core/releases/tag/${TAG}")
if [[ $STATUS_CODE == "200" ]]; then
echo "Release tag ${TAG} already exists"
exit 1
fi

python src/scripts/prepare_changelog.py

read -rp "Creating new release for $TAG. Do you want to continue? [Y/n] " prompt
Expand Down

0 comments on commit 8e4c9e2

Please sign in to comment.