File: retag.sh

package info (click to toggle)
python-discogs-client 2.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 568 kB
  • sloc: python: 1,685; sh: 83; makefile: 18
file content (23 lines) | stat: -rwxr-xr-x 536 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 ]] || [[ -z $2 ]]; then
    echo "usage: ./retag.sh <version> <remote> [additional push options]"
    exit 1
fi

set -x
VERS=$1
REMOTE=$2
PUSH_OPTS="$3"

git tag -d $VERS
git push $REMOTE --delete $VERS
git tag $VERS
git push
git push $REMOTE --tags --follow-tags $PUSH_OPTS