forked from gt1/biobambam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbumpversion.sh
29 lines (25 loc) · 1.15 KB
/
bumpversion.sh
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
26
27
28
29
#! /bin/bash
VERSION=`grep AC_INIT < configure.in | awk -F',' '{print $2}'`
FIRST=`echo $VERSION | awk -F'.' '{print $1}'`
SECOND=`echo $VERSION | awk -F'.' '{print $2}'`
THIRD=`echo $VERSION | awk -F'.' '{print $3}'`
NEXTTHIRD=`expr ${THIRD} + 1`
awk -v first=${FIRST} -v second=${SECOND} -v third=${THIRD} '/^AC_INIT/ {gsub(first"."second"."third,first"."second"."third+1);print} ; !/^AC_INIT/{print}' < configure.in | \
awk -v first=${FIRST} -v second=${SECOND} -v third=${THIRD} '/^LIBRARY_VERSION=/ {gsub("="first"."third"."second,"="first":"third+1":"second);print} ; !/^LIBRARY_VERSION=/{print}' \
> configure.in.tmp
mv configure.in.tmp configure.in
pushd debian
export DEBEMAIL=gt1@sanger.ac.uk
export DEBFULLNAME="German Tischler"
# dch --distribution unstable -v ${FIRST}.${SECOND}.${NEXTTHIRD}-0
dch --distribution unstable -v ${FIRST}.${SECOND}.${NEXTTHIRD}
dch --release
# dch --release -v ${FIRST}.${SECOND}.${NEXTTHIRD}-1
popd
git add debian/changelog
git add configure.in
git commit
git push
TAG=biobambam_experimental_${FIRST}_${SECOND}_${NEXTTHIRD}
git tag -a ${TAG} -m "biobambam experimental version ${FIRST}_${SECOND}_${NEXTTHIRD}"
git push origin ${TAG}