File: bumpversion.sh

package info (click to toggle)
bambamc 0.0.50-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 572 kB
  • sloc: ansic: 6,589; makefile: 58; sh: 43
file content (34 lines) | stat: -rw-r--r-- 1,163 bytes parent folder | download | duplicates (4)
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
30
31
32
33
34
#! /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 ../bambamc-debian
git checkout master
git pull
pushd debian
export DEBEMAIL=gt1@sanger.ac.uk
export DEBFULLNAME="German Tischler"
dch --distribution unstable -v ${FIRST}.${SECOND}.${NEXTTHIRD}
dch --release
# dch --release -v ${FIRST}.${SECOND}.${NEXTTHIRD}-1
popd
git add debian/changelog
git commit
git push
popd

git add configure.in
git commit
git push

TAG=bambamc_${FIRST}_${SECOND}_${NEXTTHIRD}
git tag -a ${TAG} -m "bambamc version ${FIRST}_${SECOND}_${NEXTTHIRD}"
git push origin ${TAG}