-
Notifications
You must be signed in to change notification settings - Fork 0
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 #2 from Sid220/beta
Beta
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
set -e | ||
|
||
git fetch --tags # checkout action does not get these | ||
|
||
# git describe has issues with GitHub Actions: https://github.com/treeder/firetils/commit/160ef4560d8855c9c05f4cae207baeb71b7791f3/checks?check_suite_id=414542684 | ||
# oldv=$(git describe --match "v[0-9]*" --abbrev=0 HEAD) | ||
# This new way seems to work better and avoids the issue above: | ||
# -v:refname is a version sort | ||
oldv=$(git tag --sort=-v:refname --list "v[0-9]*" | head -n 1) | ||
echo "oldv: $oldv" | ||
|
||
# if there is no version tag yet, let's start at 0.0.0 | ||
if [ -z "$oldv" ]; then | ||
echo "No existing version, starting at 0.0.0" | ||
oldv="0.0.0" | ||
fi | ||
|
||
newv=$(docker run --rm -v "$PWD":/app treeder/bump --input "$oldv" patch) | ||
echo "newv: $newv" | ||
|
||
echo "Creating tag..." | ||
git tag -a "v$newv" -m "version $newv" | ||
echo "Pushing tag to github..." | ||
echo "$0" | ||
git push --follow-tags "https://sid220:$1@github.com/Sid220/docker-apriltag-localisation.git" |