3 CHLOGBKP
="/tmp/$$-chlog"
5 REPOVERSION
="git-`date +%Y%m%d-%H%M`"
7 CHANGELOG
="Automatic build from the GIT on `date`"
8 BUILDLOG
="${HOME}/log/wmaker-testing-nightly.log"
10 STATUSCMD
="git log -1 --pretty=oneline"
12 PULLCMD2
="git checkout origin/master"
13 if [ -n "${WMAKER_DISTRO}" ]; then
14 case ${WMAKER_DISTRO} in
16 PULLCMD2
="git checkout origin/next"
17 BUILDLOG
="${HOME}/log/wmaker-unstable-nightly.log"
30 echo "Usage $0 [-f|--force]"
37 test -f ${CHLOGBKP} && mv ${CHLOGBKP} debian
/changelog
49 $PULLCMD1 >>$BUILDLOG 2>&1 || errorExit
"Error pulling from the repo"
50 $PULLCMD2 >>$BUILDLOG 2>&1 || errorExit
"Error pulling from the repo"
51 CURRENT
="`$STATUSCMD`"
52 if [ "$FORCE" = "1" -o "$LATEST" != "$CURRENT" ]; then
53 echo "last revision: $LATEST" >>$BUILDLOG
54 echo "new revision: $CURRENT" >>$BUILDLOG
55 echo "FORCE: $FORCE" >>$BUILDLOG
58 echo "No changes to build, and FORCE not given." >>$BUILDLOG
64 for var
in `env | grep GNUSTEP | sed "s/=.*//"`; do
70 cp debian
/changelog
${CHLOGBKP}
71 debchange
-v ${BASEVERSION}-${REPOVERSION} "${CHANGELOG}" || return 1
76 if [ -n "${WM_GPG_KEY}" ]; then
77 ARGS="-k${WM_GPG_KEY}"
79 fakeroot dpkg-buildpackage $ARGS >>${BUILDLOG} 2>&1
82 install -d `dirname $BUILDLOG`
84 trap 'cleanup; exit 2' 2
85 trap 'cleanup; exit 2' 9
86 trap 'cleanup; exit 2' 15
88 test -d debian || errorExit "This
script must be called from the toplevel
source dir
, .
/debian must exist.
"
93 doChlog || errorExit "Error adding new changelog entry.
"
94 doBuild || errorExit "Error during build of .deb package.
"