Skip to content

Commit

Permalink
chore: faster tag and release procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
insertish committed Feb 12, 2024
1 parent c0e64c9 commit 7b18e98
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ minor:

major:
cargo release version major --execute

release:
scripts/try-tag-and-release.sh
14 changes: 14 additions & 0 deletions scripts/try-tag-and-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
date=$(date +'%Y%m%d')
incr=1

while [ $(git tag -l "$date-$incr") ]; do
incr=$((incr+1))
done

tag=$date-$incr
echo About to tag and push $tag in 3 seconds...
sleep 3s

git tag $tag
git push --atomic origin $(git rev-parse --abbrev-ref HEAD) $tag

0 comments on commit 7b18e98

Please sign in to comment.