Skip to content

Commit

Permalink
chore: add release script
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Sagi-Kazar <[email protected]>
  • Loading branch information
sagikazarmark committed Jan 24, 2024
1 parent 2f28e7d commit da36c98
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@

# python
poetry

just
semver-tool
] ++ [
self'.packages.licensei
inputs'.dagger.packages.dagger
Expand Down
25 changes: 25 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
release:
#!/usr/bin/env bash
set -euo pipefail
git checkout main > /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 $version

0 comments on commit da36c98

Please sign in to comment.