-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #559 from openmeterio/release
chore: add release script
- Loading branch information
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,6 +82,9 @@ | |
|
||
# python | ||
poetry | ||
|
||
just | ||
semver-tool | ||
] ++ [ | ||
self'.packages.licensei | ||
inputs'.dagger.packages.dagger | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |