summaryrefslogtreecommitdiffstats
path: root/bump-ver.sh
blob: 21f7df3481d1e6f6643f710497e225ecd5a2ddb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
#
# Bump the version and cut a release.  Can't be called release.sh because
# that would conflict with the make release rule in the makefile.
#

VER=$1

set -e
set +x

if [ -z "$VER" ]; then
   echo "usage: $0 version" >&2
   exit 1
fi

make clean
sed -i "s/version =.*,/version = $VER,/" setup.py
git add setup.py
git commit -m "bump version to v$VER"

git tag -s "v$VER" -m "nvmetcli release v$VER"

make release
(cd dist && gpg --armor --detach-sign nvmetcli-$VER.tar.gz)