Win32 nightlies: more small build tweaks

- start from the proper base directory (daily_build.bat)
- don't build daily/weekly unless there are new commits since the last
build

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22327 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2012-08-17 15:55:06 +00:00
parent d14b02242c
commit 9dbc45af54
4 changed files with 48 additions and 6 deletions

View File

@ -69,12 +69,12 @@ rm -rf ${_DIST_UDIR}
_BUILD_UDIR=`unix_path $BUILD_DIR`
_GNUCASH_UDIR=`unix_path $GNUCASH_DIR`
PKG_VERSION=`grep PACKAGE_VERSION ${_BUILD_UDIR}/config.h | cut -d" " -f3 | cut -d\" -f2 `
SVN_REV=`grep GNUCASH_SVN_REV ${_BUILD_UDIR}/src/core-utils/gnc-svninfo.h | cut -d" " -f3 | cut -d\" -f2 `
REVISION=`grep GNUCASH_SVN_REV ${_BUILD_UDIR}/src/core-utils/gnc-svninfo.h | cut -d" " -f3 | cut -d\" -f2 `
# Choose the output filename based on our "build_from_tarball" setting
# Make sure this logic matches the logic in dist.sh!
if [ "$BUILD_FROM_TARBALL" = "no" ]; then
SETUP_FILENAME="gnucash-${PKG_VERSION}-$(date +'%Y-%m-%d')-git-${SVN_REV}-setup.exe"
SETUP_FILENAME="gnucash-${PKG_VERSION}-$(date +'%Y-%m-%d')-git-${REVISION}-setup.exe"
else
SETUP_FILENAME="gnucash-${PKG_VERSION}-setup.exe"
fi

View File

@ -2,7 +2,7 @@ rem This is the Windows Batch Script for the daily builds.
rem It simply calls the actual MSYS Shell script to perform
rem the daily build and then the tag builds.
cd c:\soft\packaging
cd c:\soft\gnucash\repos\packaging\win32\
rem Development build (daily)
c:\msys\1.0\bin\sh.exe --login c:\soft\gnucash\repos\packaging\win32\daily_build_git.sh

View File

@ -28,5 +28,26 @@ set_env "$_GIT_UDIR/bin/git" GIT_CMD
export GIT_CMD
$GIT_CMD pull
./build_package_git.sh
################################################################
# determine if there are any new commits since the last time we ran
#
# If we don't have a rev file then start from 'now' and force a build
revfile=last_rev_daily
if [ ! -f ${revfile} ] ; then
echo $($GIT_CMD rev-parse HEAD) > ${revfile}
oldrev=a # definitely an invalid, so non-existing git rev
else
oldrev=$(cat ${revfile})
fi
newrev=$($GIT_CMD rev-parse HEAD)
if [[ "${oldrev}" != "${oldrev}" ]]; then
./build_package_git.sh
fi
# move the new file into place, will only happen if the build was successful
echo ${newrev} > ${revfile}
qpopd

View File

@ -31,5 +31,26 @@ set_env "$_GIT_UDIR/bin/git" GIT_CMD
export $GIT_CMD
$GIT_CMD pull
./build_package.sh
qpopd
################################################################
# determine if there are any new commits since the last time we ran
#
# If we don't have a rev file then start from 'now' and force a build
revfile=last_rev_weekly
if [ ! -f ${revfile} ] ; then
echo $($GIT_CMD rev-parse HEAD) > ${revfile}
oldrev=a # definitely an invalid, so non-existing git rev
else
oldrev=$(cat ${revfile})
fi
newrev=$($GIT_CMD rev-parse HEAD)
if [[ "${oldrev}" != "${oldrev}" ]]; then
./build_package_git.sh
fi
# move the new file into place, will only happen if the build was successful
echo ${newrev} > ${revfile}
qpopd