r22327 - gnucash/trunk/packaging/win32 - Win32 nightlies: more small build tweaks

Geert Janssens gjanssens at code.gnucash.org
Fri Aug 17 11:55:07 EDT 2012


Author: gjanssens
Date: 2012-08-17 11:55:06 -0400 (Fri, 17 Aug 2012)
New Revision: 22327
Trac: http://svn.gnucash.org/trac/changeset/22327

Modified:
   gnucash/trunk/packaging/win32/build_package_git.sh
   gnucash/trunk/packaging/win32/daily_build.bat
   gnucash/trunk/packaging/win32/daily_build_git.sh
   gnucash/trunk/packaging/win32/weekly_build_git.sh
Log:
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

Modified: gnucash/trunk/packaging/win32/build_package_git.sh
===================================================================
--- gnucash/trunk/packaging/win32/build_package_git.sh	2012-08-16 18:13:26 UTC (rev 22326)
+++ gnucash/trunk/packaging/win32/build_package_git.sh	2012-08-17 15:55:06 UTC (rev 22327)
@@ -69,12 +69,12 @@
 _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

Modified: gnucash/trunk/packaging/win32/daily_build.bat
===================================================================
--- gnucash/trunk/packaging/win32/daily_build.bat	2012-08-16 18:13:26 UTC (rev 22326)
+++ gnucash/trunk/packaging/win32/daily_build.bat	2012-08-17 15:55:06 UTC (rev 22327)
@@ -2,7 +2,7 @@
 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

Modified: gnucash/trunk/packaging/win32/daily_build_git.sh
===================================================================
--- gnucash/trunk/packaging/win32/daily_build_git.sh	2012-08-16 18:13:26 UTC (rev 22326)
+++ gnucash/trunk/packaging/win32/daily_build_git.sh	2012-08-17 15:55:06 UTC (rev 22327)
@@ -28,5 +28,26 @@
 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

Modified: gnucash/trunk/packaging/win32/weekly_build_git.sh
===================================================================
--- gnucash/trunk/packaging/win32/weekly_build_git.sh	2012-08-16 18:13:26 UTC (rev 22326)
+++ gnucash/trunk/packaging/win32/weekly_build_git.sh	2012-08-17 15:55:06 UTC (rev 22327)
@@ -31,5 +31,26 @@
 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
\ No newline at end of file



More information about the gnucash-changes mailing list