-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Example values containing "=" were ignored
- Add new '--version' flag - Add new BUILD_DATE for use in --version output
- Loading branch information
Showing
2 changed files
with
47 additions
and
12 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,12 +28,15 @@ jobs: | |
git config --global user.email "[email protected]" | ||
git config --global user.name "Github Actions" | ||
go install git.sr.ht/~jcmuller/semver-bumper@latest | ||
OLD_TAG=$(git tag --list 'v*' | semver-bumper -s) | ||
NEW_TAG=$(git tag --list 'v*' | semver-bumper --increment minor) | ||
sed -i "s/$OLD_TAG/$NEW_TAG/g" default.nix | ||
newTag=$(git tag --list 'v*' | semver-bumper --increment minor) | ||
buildDate=$(date --iso-8601=seconds) | ||
sed -i -e "s@BUILD_DATE = \".\+\"@BUILD_DATE = \"${buildDate/v}\"@" main.go | ||
sed -i -e "s@VERSION = \".\+\"@VERSION = \"${newTag/v}\"@" main.go | ||
sed -i -e "s@version = \".\+\"@version = \"${newTag/v}\"@" default.nix | ||
git add default.nix | ||
git commit -m "Bump version in default.nix" --allow-empty | ||
git tag $NEW_TAG | ||
git add main.go | ||
git commit -m "Bump release version" | ||
git tag $newTag | ||
git push | ||
git push --tags | ||
- name: Run GoReleaser | ||
|
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