From 22730876e42f2e82f2f05d53a0c8c687628a2467 Mon Sep 17 00:00:00 2001 From: Martin Dietze Date: Fri, 28 Aug 2009 18:52:26 +0200 Subject: [PATCH] Nightly Build script can now deal with testing and unstable branches. --- debian/nightly_build.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/debian/nightly_build.sh b/debian/nightly_build.sh index 76fcbcf6..e899a9e2 100755 --- a/debian/nightly_build.sh +++ b/debian/nightly_build.sh @@ -8,7 +8,17 @@ CHANGELOG="Automatic build from the GIT on `date`" BUILDLOG="${HOME}/log/wmaker-testing-nightly.log" STATUSCMD="git log -1 --pretty=oneline" -PULLCMD="git pull" +PULLCMD1="git fetch" +PULLCMD2="git checkout origin/master" +if [ -n "${WMAKER_DISTRO}" ]; then + case ${WMAKER_DISTRO} in + unstable) + PULLCMD2="git checkout origin/next" + BUILDLOG="${HOME}/log/wmaker-unstable-nightly.log" + ;; + esac +fi + FORCE="0" if [ $# -gt 0 ]; then @@ -36,7 +46,8 @@ errorExit() { doPull() { RC="1" LATEST="`$STATUSCMD`" - $PULLCMD >>$BUILDLOG 2>&1 || errorExit "Error pulling from the repo" + $PULLCMD1 >>$BUILDLOG 2>&1 || errorExit "Error pulling from the repo" + $PULLCMD2 >>$BUILDLOG 2>&1 || errorExit "Error pulling from the repo" CURRENT="`$STATUSCMD`" if [ "$FORCE" = "1" -o "$LATEST" != "$CURRENT" ]; then echo "last revision: $LATEST" >>$BUILDLOG