File: push-tags.sh

package info (click to toggle)
python-confection 1.0.0~dev0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 260 kB
  • sloc: python: 2,588; sh: 13; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 351 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash

set -e

# Insist repository is clean
git diff-index --quiet HEAD

git checkout $1
git pull origin $1
git push origin $1

version=$(grep "version = " setup.cfg)
version=${version/version = }
version=${version/\'/}
version=${version/\'/}
version=${version/\"/}
version=${version/\"/}

git tag "v$version"
git push origin "v$version"