3 CHLOGBKP
="/tmp/$$-chlog"
5 BASEVERSION
="`head -1 debian/changelog | cut -d\( -f2 | cut -d\- -f1`"
6 REPOVERSION
="git-`date +%Y%m%d-%H%M`"
8 CHANGELOG
="Automatic build from the GIT on `date`"
9 BUILDLOG
="${HOME}/log/wmaker-testing-nightly.log"
11 STATUSCMD
="git log -1 --pretty=oneline"
12 PULLCMD
="git pull --rebase"
13 if [ -n "${WMAKER_DISTRO}" ]; then
14 case ${WMAKER_DISTRO} in
16 BUILDLOG
="${HOME}/log/wmaker-unstable-nightly.log"
29 echo "Usage $0 [-f|--force]"
36 test -f ${CHLOGBKP} && mv ${CHLOGBKP} debian
/changelog
51 $PULLCMD >>$BUILDLOG 2>&1 || errorExit
"Error pulling from the repo"
52 CURRENT
="`$STATUSCMD`"
53 if [ "$FORCE" = "1" -o "$LATEST" != "$CURRENT" ]; then
54 echo "last revision: $LATEST" >>$BUILDLOG
55 echo "new revision: $CURRENT" >>$BUILDLOG
56 echo "FORCE: $FORCE" >>$BUILDLOG
59 echo "No changes to build, and FORCE not given." >>$BUILDLOG
65 for var
in `env | grep GNUSTEP | sed "s/=.*//"`; do
71 cp debian
/changelog
${CHLOGBKP}
72 debchange
-v ${BASEVERSION}-${REPOVERSION}-1 "${CHANGELOG}" || return 1
76 echo tar -czf ../wmaker_${BASEVERSION}-${REPOVERSION}.orig.tar.gz .
77 tar -czf ../wmaker_${BASEVERSION}-${REPOVERSION}.orig.tar.gz .
82 if [ -n "${WM_GPG_KEY}" ]; then
83 ARGS="-k${WM_GPG_KEY}"
85 dpkg-buildpackage -rfakeroot $ARGS >>${BUILDLOG} 2>&1
88 install -d `dirname $BUILDLOG`
90 trap 'cleanup; exit 2' 2
91 trap 'cleanup; exit 2' 9
92 trap 'cleanup; exit 2' 15
94 test -d debian || errorExit "This
script must be called from the toplevel
source dir
, .
/debian must exist.
"
96 #git status | grep modified: | awk '{ print $3 }' | xargs git checkout
97 git checkout -f >/dev/null
101 doChlog || errorExit "Error adding new changelog entry.
"
102 doTarball || errorExit "Error building
source tarball.
"
103 doBuild || errorExit "Error during build of .deb package.
"