This repository has been archived by the owner on Mar 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
release.sh
52 lines (46 loc) · 1.58 KB
/
release.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#! /bin/bash
# update branches
git checkout experimental
git pull -v
git checkout experimental-debian
git pull -v
git checkout debian
git pull -v
git checkout master
git pull -v
# merge
git checkout master
git merge -m "Merge experimental branch into master branch" experimental
git push -v
git checkout debian
git merge -m "Merge experimental-debian branch into debian branch" experimental-debian
git push -v
# add release tag/branch
git checkout master
VERSION=`grep <configure.ac "AC_INIT" | perl -p -e "s/.*AC_INIT\(//" | awk -F ',' '{print $2}'`
DATE=`date +"%Y%m%d%H%M%S"`
RELEASE=${VERSION}-release-${DATE}
git checkout -b ${RELEASE}-branch master
PATH=/software/hpag/autotools/bin:${PATH} autoreconf -i -f
ADDFILES="INSTALL Makefile.in aclocal.m4 autom4te.cache compile config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 missing src/Makefile.in test/Makefile.in"
mv .gitignore .gitignore_
git add ${ADDFILES}
git commit -m "Release ${RELEASE}"
mv .gitignore_ .gitignore
git tag ${RELEASE}
git push -v origin ${RELEASE}
git checkout master
git branch -D ${RELEASE}-branch
git checkout experimental
# launchpad branch update
git checkout debian
tar czvf debian.tar.gz debian
git checkout debian-launchpad
git merge -m "Merge master branch into debian branch" master
tar xzvf debian.tar.gz
rm debian.tar.gz
sed -i -e "s|libstaden-read-dev (>= 1\.13\.0)|staden-io-lib-trunk-dev (>= 1.13.0)|" debian/control
git commit -a -m "update dependency for launchpad"
git push -v
git checkout experimental
rm -fR debian