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-nightly.log"
10 STATUSCMD="git log -1 --pretty=oneline"
20 echo "Usage $0 [-f|--force]"
27 mv ${CHLOGBKP} debian/changelog
39 $PULLCMD >>$BUILDLOG 2>&1 || errorExit "Error pulling from the repo"
40 CURRENT="`$STATUSCMD`"
41 if [ "$FORCE" = "1" -o "$LATEST" != "$CURRENT" ]; then
42 echo "last revision: $LATEST" >>$BUILDLOG
43 echo "new revision: $CURRENT" >>$BUILDLOG
44 echo "FORCE: $FORCE" >>$BUILDLOG
47 echo "No changes to build, and FORCE not given." >>$BUILDLOG
53 for var in `env | grep GNUSTEP | sed "s/=.*//"`; do
59 cp debian/changelog ${CHLOGBKP}
60 debchange -v ${BASEVERSION}-${REPOVERSION} "${CHANGELOG}" || return 1
65 if [ -n "${WM_GPG_KEY}" ]; then
66 ARGS="-k${WM_GPG_KEY}"
68 fakeroot dpkg-buildpackage $ARGS >>${BUILDLOG} 2>&1
71 install -d `dirname $BUILDLOG`
73 trap 'cleanup; exit 2' 2
74 trap 'cleanup; exit 2' 9
75 trap 'cleanup; exit 2' 15
77 test -d debian || errorExit "This script must be called from the toplevel source dir, ./debian must exist."
82 doChlog || errorExit "Error adding new changelog entry."
83 doBuild || errorExit "Error during build of .deb package."