Skip to content

Commit

Permalink
Add release just recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed Aug 13, 2024
1 parent e203323 commit 6cad903
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,26 @@ run:

transfer:
./hack/ccp/hack/transfer-via-api.sh

# Tag and release new version.
release:
#!/usr/bin/env bash
set -euo pipefail
branch=qa/2.x
git checkout ${branch} > /dev/null 2>&1
git diff-index --quiet HEAD || (echo "Git directory is dirty" && exit 1)
version=v$(semver bump prerelease beta.. $(git describe --abbrev=0))
echo "Detected version: ${version}"
read -n 1 -p "Is that correct (y/N)? " answer
echo
case ${answer:0:1} in
y|Y )
echo "Tagging release with version ${version}"
;;
* )
echo "Aborting"
exit 1
;;
esac
git tag -m "Release ${version}" $version
git push origin refs/tags/$version

0 comments on commit 6cad903

Please sign in to comment.