-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: clean release tags and release notes (#324)
- Loading branch information
1 parent
09664a6
commit f746261
Showing
7 changed files
with
56 additions
and
17 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
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
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,10 @@ | ||
#!/bin/bash | ||
|
||
tags=("v1.0.0" "v1.0.1" "v1.1.0" "v2.0.0") | ||
|
||
for tag in "${tags[@]}"; do | ||
if [ $(git tag -l "$tag") ]; then | ||
git push origin --delete "$tag" | ||
echo "Deleted $tag" | ||
fi | ||
done |
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,14 @@ | ||
#!/bin/bash | ||
|
||
release_notes=$1 | ||
echo "$release_notes" &> release-notes.txt | ||
sed -i '1d' release-notes.txt | ||
|
||
previous_tag=$(./get-latest-tag.sh) | ||
today="v$(date "+%Y%m%d")" | ||
|
||
echo "today: $today" | ||
|
||
git tag "$today" | ||
git push --tags | ||
gh release create "$today" --draft --generate-notes --latest --notes-file release-notes.txt --notes-start-tag "$previous_tag" --title "$today" |
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,7 @@ | ||
#!/bin/bash | ||
|
||
git fetch --tags | ||
tags=$(git tag -l "v*") | ||
latest_tag=$(echo "$tags" | grep -E '^v[0-9]+$' | sort -Vr | head -n 1) | ||
|
||
echo "$latest_tag" |
This file was deleted.
Oops, something went wrong.