-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get latest retag.sh from discogs_client repo
- Loading branch information
Showing
1 changed file
with
15 additions
and
4 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 |
---|---|---|
@@ -1,12 +1,23 @@ | ||
#!/bin/bash | ||
# 1) Deletes the git tag passed in $1: | ||
# - locally | ||
# - on the remote passed in $2 | ||
# 2) Tags HEAD again with the given version number, | ||
# 3) and pushes commits and tags again to remote | ||
# Additional push options can be passed in $3. | ||
|
||
if [[ -z $1 ]]; then | ||
echo "usage: ./retag.sh <tagname>" | ||
if [[ -z $1 ]] || [[ -z $2 ]]; then | ||
echo "usage: ./retag.sh <version> <remote> [additional push options]" | ||
exit 1 | ||
fi | ||
PUSH_OPTS="$2" | ||
|
||
set -x | ||
VERS=$1 | ||
REMOTE=$2 | ||
PUSH_OPTS="$3" | ||
|
||
git tag -d $VERS; git push origin --delete $VERS; git tag $VERS; git push; git push --tags --follow-tags | ||
git tag -d $VERS | ||
git push $REMOTE --delete $VERS | ||
git tag $VERS | ||
git push | ||
git push $REMOTE --tags --follow-tags $PUSH_OPTS |