gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Tue Apr 1 15:17:15 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/1688e6c2 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c73eaa89 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/e2f49114 (commit)
	from  https://github.com/Gnucash/gnucash/commit/b659a47d (commit)



commit 1688e6c29f1c42e107f762553b2c28c50fc5a09c
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Apr 1 12:16:54 2014 -0700

    Rename _git files to plain, fix links.

diff --git a/packaging/win32/build_package_git.sh b/packaging/win32/build_package.sh
similarity index 100%
rename from packaging/win32/build_package_git.sh
rename to packaging/win32/build_package.sh
diff --git a/packaging/win32/build_tags_git.sh b/packaging/win32/build_tags.sh
similarity index 98%
rename from packaging/win32/build_tags_git.sh
rename to packaging/win32/build_tags.sh
index b394b6f..8e2e7f8 100644
--- a/packaging/win32/build_tags_git.sh
+++ b/packaging/win32/build_tags.sh
@@ -123,6 +123,6 @@ for tag_rev in $tags ; do
   # Now build the tag!  (this will upload it too)
   # Use the build_package script from trunk (cwd), not from the tag
   qpushd ${w32pkg}
-    ${pkgdir}/build_package_git.sh ${tag}
+    ${pkgdir}/build_package.sh ${tag}
   qpopd
 done
diff --git a/packaging/win32/daily_build.bat b/packaging/win32/daily_build.bat
index 3828eee..c38bec7 100644
--- a/packaging/win32/daily_build.bat
+++ b/packaging/win32/daily_build.bat
@@ -5,9 +5,9 @@ rem the daily build and then the tag builds.
 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
+c:\msys\1.0\bin\sh.exe --login c:\soft\gnucash\repos\packaging\win32\daily_build.sh
 rem Tags build for 2.5 and newer (daily -- only tags that weren't built yet)
-c:\msys\1.0\bin\sh.exe --login c:\soft\gnucash\repos\packaging\win32\build_tags_git.sh
-rem 2.6 branch build (weekly)
+c:\msys\1.0\bin\sh.exe --login c:\soft\gnucash\repos\packaging\win32\build_tags.sh
+rem maintenance branch build (weekly)
 rem There's no 2.6 branch yet. Hence the line below is commented out
-rem c:\msys\1.0\bin\sh.exe --login c:\soft-2.6\gnucash\repos\packaging\weekly_build.sh
\ No newline at end of file
+rem c:\msys\1.0\bin\sh.exe --login c:\soft-maint\gnucash\repos\packaging\weekly_build.sh
\ No newline at end of file
diff --git a/packaging/win32/daily_build_git.sh b/packaging/win32/daily_build.sh
similarity index 98%
rename from packaging/win32/daily_build_git.sh
rename to packaging/win32/daily_build.sh
index 38aed10..e1e8f83 100644
--- a/packaging/win32/daily_build_git.sh
+++ b/packaging/win32/daily_build.sh
@@ -44,7 +44,7 @@ fi
 
 newrev=$($GIT_CMD rev-parse HEAD)
 if [[ "${oldrev}" != "${newrev}" ]]; then
-  ./build_package_git.sh
+  ./build_package.sh
 fi
 
 # move the new file into place, will only happen if the build was successful
diff --git a/packaging/win32/weekly_build_git.sh b/packaging/win32/weekly_build.sh
similarity index 98%
rename from packaging/win32/weekly_build_git.sh
rename to packaging/win32/weekly_build.sh
index b3aef2d..16ca9ce 100644
--- a/packaging/win32/weekly_build_git.sh
+++ b/packaging/win32/weekly_build.sh
@@ -47,7 +47,7 @@ fi
 
 newrev=$($GIT_CMD rev-parse HEAD)
 if [[ "${oldrev}" != "${newrev}" ]]; then
-  ./build_package_git.sh
+  ./build_package.sh
 fi
 
 # move the new file into place, will only happen if the build was successful

commit c73eaa89f2cecff51622e164e70ca8fb44e821ea
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Apr 1 12:04:22 2014 -0700

    Remove svn-based build files

diff --git a/packaging/win32/build_package.sh b/packaging/win32/build_package.sh
deleted file mode 100644
index 179995c..0000000
--- a/packaging/win32/build_package.sh
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/bin/sh
-
-#
-# This assumes we're in the "packaging" directory for the correct build.
-# It could be the packaging/win32 subdir of a tag checkout, or it could
-# be the top-level daily-build packaging directory.
-#
-
-set -o pipefail
-set -e
-LOG_DIR=build-logs
-
-function on_error() {
-  if [ `hostname` = "gnucash-win32" ]; then
-    scp -p ${LOGFILE} upload at code.gnucash.org:public_html/win32/$LOG_DIR
-  fi
-  exit
-}
-
-function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; }
-
-tag="$1"
-
-. functions.sh
-. defaults.sh
-
-# Determine where to upload to
-if $(echo $REPOS_URL | grep -q tags); then
-  TARGET_DIR=releases
-  LOG_TAG=$tag
-else
-  TARGET_DIR=${REPOS_URL##*/}
-  LOG_TAG=$TARGET_DIR
-fi
-
-set_default OUTPUT_DIR $GLOBAL_DIR\\output
-LOGFILENAME=build-${LOG_TAG}-`date +'%Y-%m-%d'`.log
-
-_OUTPUT_DIR=`unix_path $OUTPUT_DIR`
-LOGFILE=${_OUTPUT_DIR}/${LOGFILENAME}
-mkdir -p ${_OUTPUT_DIR}
-
-# Small hack to create $LOG_DIR on the webserver if it doesn't exist yet
-if [ `hostname` = "gnucash-win32" ]; then
-  mkdir -p "$_OUTPUT_DIR/$LOG_DIR"
-  scp -r "$_OUTPUT_DIR/$LOG_DIR" upload at code.gnucash.org:public_html/win32
-  rmdir "$_OUTPUT_DIR/$LOG_DIR"
-fi
-
-# If we're running on the build server, copy a temporary logfile
-# content to the webserver to signal that the build is in progress
-if [ `hostname` = "gnucash-win32" ]; then
-    _PWD=`pwd`
-    echo "Build for tag \"${tag}\" is in progress (current working directory: ${_PWD}) ..." > ${LOGFILE}
-    scp -p ${LOGFILE} upload at code.gnucash.org:public_html/win32/$LOG_DIR
-fi
-
-set +e
-trap on_error ERR
-
-# Run the compile
-./install.sh 2>&1 | tee ${LOGFILE}
-
-# This directory needs to be removed before calling dist.sh
-DIST_DIR=${INSTALL_DIR}\\..\\dist
-_DIST_UDIR=`unix_path $DIST_DIR`
-rm -rf ${_DIST_UDIR}
-
-# Create the installer
-./dist.sh 2>&1 | tee -a ${LOGFILE}
-
-# Copy the resulting installer into the output directory
-_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 `
-GNUCASH_SCM_REV=`grep GNUCASH_SCM_REV ${_BUILD_UDIR}/src/core-utils/gnc-scm-info.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}-svn-r${GNUCASH_SCM_REV}-setup.exe"
-else
-  SETUP_FILENAME="gnucash-${PKG_VERSION}-setup.exe"
-fi
-if [ ! -d ${_OUTPUT_DIR} ] ; then
-    echo "Error: _OUTPUT_DIR=${_OUTPUT_DIR} does not exist" >> ${LOGFILE}
-fi
-if [ -f ${_GNUCASH_UDIR}/${SETUP_FILENAME} ] ; then
-    echo "Successfully created ${SETUP_FILENAME} in ${_GNUCASH_UDIR}" >> ${LOGFILE}
-else
-    echo "Error: File _GNUCASH_UDIR/SETUP_FILENAME = ${_GNUCASH_UDIR}/${SETUP_FILENAME} does not exist" >> ${LOGFILE}
-    echo "Files in _GNUCASH_UDIR:" >> ${LOGFILE}
-    ls ${_GNUCASH_UDIR}/* >> ${LOGFILE}
-fi
-mv ${_GNUCASH_UDIR}/${SETUP_FILENAME} ${_OUTPUT_DIR} >> ${LOGFILE} 2>&1
-
-#
-# Verify that PKG_VERSION == $tag, and add to the build log if it's not.
-# Note: only do this if tag exists and matches x.y.z
-#
-if [ -n "${tag}" ] ; then
-  case "${tag}" in
-  [0-9]*.[0-9]*.[0-9]*)
-     if [ "${PKG_VERSION}" != "${tag}" ] ; then
-       echo "" >> ${LOGFILE}
-       echo " *** ERROR: Package Version ${PKG_VERSION} doesn't match Tag ${tag}" >> ${LOGFILE}
-       echo "" >> ${LOGFILE}
-    fi
-    ;;
-  esac
-fi
-
-# If we're running on the build server then upload the files
-if [ `hostname` = "gnucash-win32" ]; then
-  # Small hack to create the $TARGET_DIR on the webserver if it doesn't exist yet
-  mkdir -p "$_OUTPUT_DIR/$TARGET_DIR" >> ${LOGFILE} 2>&1
-  scp -r "$_OUTPUT_DIR/$TARGET_DIR" upload at code.gnucash.org:public_html/win32 >> ${LOGFILE} 2>&1
-  rmdir "$_OUTPUT_DIR/$TARGET_DIR" >> ${LOGFILE} 2>&1
-  # Copy the files to the chosen target directory
-  scp -p ${_OUTPUT_DIR}/${SETUP_FILENAME} upload at code.gnucash.org:public_html/win32/$TARGET_DIR >> ${LOGFILE} 2>&1
-  scp -p ${LOGFILE} upload at code.gnucash.org:public_html/win32/$LOG_DIR
-fi
diff --git a/packaging/win32/build_tags.sh b/packaging/win32/build_tags.sh
deleted file mode 100644
index 155e5f3..0000000
--- a/packaging/win32/build_tags.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/sh
-#
-# Notes:
-# 1. for this script to work, you need to make sure bash can
-#    find svn on your system. If it's not in the default
-#    Windows path, you will have to add it yourself, for
-#    example like this:
-#    - create a file /etc/profile.d/svn.sh
-#    - add this line: export PATH=/c/soft/svn/bin:$PATH
-#    (Use the real path to your svn installation, obviously)
-#
-# 2. Should this script change in the source repository, then the
-#    svn update below will fail due to a limitation in Windows that
-#    won't allow to change a file that is "in use". So in the rare
-#    situation this script needs to be updated, you will need to
-#    run the svn update once yourself.
-
-set -e
-
-function qpushd() { pushd "$@" >/dev/null; }
-function qpopd() { popd >/dev/null; }
-function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; }
-
-TAG_URL=http://svn.gnucash.org/repo/gnucash/tags
-
-################################################################
-# Setup our environment  (we need the DOWNLOAD_DIR)
-
-qpushd "$(dirname $(unix_path "$0"))"
-pkgdir="`pwd`"
-svn update
-. functions.sh
-. defaults.sh
-
-
-################################################################
-# determine if there are any new tags since the last time we ran
-#
-
-# If we don't have a tagfile then start from 'now'
-tagfile=tags
-if [ ! -f ${tagfile} ] ; then
-  svn ls -v ${TAG_URL} |  awk '/[^.]\// { print $1"/"$6 }' > ${tagfile}
-fi
-
-# Figure out the new set of tags
-svn ls -v ${TAG_URL} |  awk '/[^.]\// { print $1"/"$6 }' > ${tagfile}.new
-tags="`diff --suppress-common-lines ${tagfile} ${tagfile}.new | grep '^> ' | sed -e 's/^> //g'`"
-
-# move the new file into place
-mv -f ${tagfile}.new ${tagfile}
-
-################################################################
-# Now iterate over all the new tags (if any) and build a package
-
-for tag_rev in $tags ; do
-  tag=${tag_rev#*/}
-  tag=${tag%/*}
-  
-  # From 2.5 and up, tags are built from git
-  tag_major=${tag%%.*}
-  tag_tmp=${tag#*.}
-  tag_minor=${tag_tmp%%.*}
-  major_minor=$(( $tag_major*100 + $tag_minor ))
-  if (( $major_minor >= 205 ))
-  then
-     continue
-  fi
-  
-  tagbasedir=/c/soft/gnucash-${tag}
-  tagdir=${tagbasedir}/gnucash
-  rm -fr $tagbasedir
-  mkdir -p ${tagdir}
-  echo "Building tag $tag in $tagbasedir."
-
-  # Copy the downloads to save time
-  mkdir -p ${tagbasedir}/downloads
-  cp -p $(unix_path ${DOWNLOAD_DIR})/* ${tagbasedir}/downloads
-  echo "Successfully copied the downloads dir to ${tagbasedir}/downloads"
-
-  # Check out the tag and setup custom.sh
-  svn co -q ${TAG_URL}/${tag} ${tagdir}/repos
-  w32pkg=${tagdir}/repos/packaging/win32
-  cp -p "${pkgdir}/custom.sh" ${w32pkg}/custom.sh
-  echo "Successfully checked out the sources"
-
-  # Set the global directory to the tag build
-  echo -n 'GLOBAL_DIR=c:\\soft\\gnucash-' >> ${w32pkg}/custom.sh
-  echo "${tag}" >> ${w32pkg}/custom.sh
-
-  # No need to update the sources we just checked out
-  echo "UPDATE_SOURCES=no" >> ${w32pkg}/custom.sh
-  
-  # But set the repos url to the current tag anyway, it will be used
-  # to name the log file
-  echo -n "REPOS_URL=" >> ${w32pkg}/custom.sh
-  echo "${TAG_URL}/${tag}" >> ${w32pkg}/custom.sh
-  
-  # Use the proper branch for the documentation
-  echo -n "DOCS_URL=" >> ${w32pkg}/custom.sh
-  echo "http://svn.gnucash.org/repo/gnucash-docs/branches/${tag_major}.${tag_minor}" >> ${w32pkg}/custom.sh
-
-  # BUILD_FROM_TARBALL is special:
-  # in install.sh place we check !=yes, in defaults.sh =yes, in dist.sh =no
-  # We want it to look like 'no' in install and defaults, but yes in dist
-  # so this hack works!
-  echo "BUILD_FROM_TARBALL=maybe" >> ${w32pkg}/custom.sh
-
-  # Point HH_DIR at the global installation because we don't need to redo it
-  echo -n "HH_DIR=" >> ${w32pkg}/custom.sh
-  echo "${GLOBAL_DIR}\\hh" | sed -e 's/\\/\\\\/g' >> ${w32pkg}/custom.sh
-
-  # Now build the tag!  (this will upload it too)
-  # Use the build_package script from trunk (cwd), not from the tag
-  qpushd ${w32pkg}
-    ${pkgdir}/build_package.sh ${tag}
-  qpopd
-done
diff --git a/packaging/win32/daily_build.sh b/packaging/win32/daily_build.sh
deleted file mode 100755
index a2ce0e2..0000000
--- a/packaging/win32/daily_build.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-#
-# Notes:
-# 1. for this script to work, you need to make sure bash can
-#    find svn on your system. If it's not in the default
-#    Windows path, you will have to add it yourself, for
-#    example like this:
-#    - create a file /etc/profile.d/svn.sh
-#    - add this line: export PATH=/c/soft/svn/bin:$PATH
-#    (Use the real path to your svn installation, obviously)
-#
-# 2. The recommended setup is to call this script from within the
-#    source code repository (packaging/win32 directory). This is
-#    different from before, where it was assumed to be called
-#    from outside the source code repository. To remain some
-#    compatibility with the old way, svn update is called twice
-#    - once for the repository (to update all)
-#    - once for the build scripts (to also update the build scripts
-#       using the old way)
-#    The second invocation is superfluous if this script was called
-#    from within the source code repository.
-#
-# 3. Should this script change in the source repository, then the
-#    svn update below will fail due to a limitation in Windows that
-#    won't allow to change a file that is "in use". So in the rare
-#    situation this script needs to be updated, you will need to
-#    run the svn update once yourself.
-
-set -e
-
-function qpushd() { pushd "$@" >/dev/null; }
-function qpopd() { popd >/dev/null; }
-function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; }
-
-qpushd "$(dirname $(unix_path "$0"))"
-. functions.sh
-. defaults.sh
-
-qpushd "$REPOS_DIR"
-svn update
-qpopd
-
-svn update
-
-./build_package.sh
-qpopd
diff --git a/packaging/win32/weekly_build.sh b/packaging/win32/weekly_build.sh
deleted file mode 100644
index 250d310..0000000
--- a/packaging/win32/weekly_build.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-#
-# Notes:
-# 1. for this script to work, you need to make sure bash can
-#    find svn on your system. If it's not in the default
-#    Windows path, you will have to add it yourself, for
-#    example like this:
-#    - create a file /etc/profile.d/svn.sh
-#    - add this line: export PATH=/c/soft/svn/bin:$PATH
-#    (Use the real path to your svn installation, obviously)
-#
-# 2. The recommended setup is to call this script from within the
-#    source code repository (packaging/win32 directory). This is
-#    different from before, where it was assumed to be called
-#    from outside the source code repository. To remain some
-#    compatibility with the old way, svn update is called twice
-#    - once for the repository (to update all)
-#    - once for the build scripts (to also update the build scripts
-#       using the old way)
-#    The second invocation is superfluous if this script was called
-#    from within the source code repository.
-#
-# 3. Should this script change in the source repository, then the
-#    svn update below will fail due to a limitation in Windows that
-#    won't allow to change a file that is "in use". So in the rare
-#    situation this script needs to be updated, you will need to
-#    run the svn update once yourself.
-
-set -e
-
-## Only run this script on Monday night (first day of the week)
-if [ `date +%u` != 1 ] ; then exit ; fi
-
-function qpushd() { pushd "$@" >/dev/null; }
-function qpopd() { popd >/dev/null; }
-function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; }
-
-qpushd "$(dirname $(unix_path "$0"))"
-svn update
-./build_package.sh
-qpopd

commit e2f49114d9a8b2cfce3c638d16ce745dbf68673c
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Apr 1 11:56:14 2014 -0700

    Write a timestamp log file at the beginning of a build on the server.
    
    So that we know when/if the build has started.

diff --git a/packaging/win32/build_package_git.sh b/packaging/win32/build_package_git.sh
index ea842f3..9ca857e 100644
--- a/packaging/win32/build_package_git.sh
+++ b/packaging/win32/build_package_git.sh
@@ -10,10 +10,12 @@
 set -o pipefail
 set -e
 LOG_DIR=build-logs
+BUILD_HOST="gnucash-win32"
+LOG_HOST=upload at code.gnucash.org:public_html/win32
 
 function on_error() {
-  if [ `hostname` = "gnucash-win32" ]; then
-    scp -p ${LOGFILE} upload at code.gnucash.org:public_html/win32/$LOG_DIR
+  if [ `hostname` = ${BUILD_HOST} ]; then
+    scp -p ${LOGFILE} ${LOG_HOST}/$LOG_DIR
   fi
   exit
 }
@@ -45,12 +47,20 @@ LOGFILE=${_OUTPUT_DIR}/${LOGFILENAME}
 mkdir -p ${_OUTPUT_DIR}
 
 # Small hack to create $LOG_DIR on the webserver if it doesn't exist yet
-if [ `hostname` = "gnucash-win32" ]; then
+if [ `hostname` = ${BUILD_HOST} ]; then
   mkdir -p "$_OUTPUT_DIR/$LOG_DIR"
-  scp -r "$_OUTPUT_DIR/$LOG_DIR" upload at code.gnucash.org:public_html/win32
+  scp -r "$_OUTPUT_DIR/$LOG_DIR" ${LOG_HOST}
   rmdir "$_OUTPUT_DIR/$LOG_DIR"
 fi
 
+# If we're running on the build server, copy a temporary logfile
+# content to the webserver to signal that the build is in progress
+if [ `hostname` = ${BUILD_HOST} ]; then
+    _PWD=`pwd`
+    echo "Build for tag \"${tag}\" is in progress (current working directory: ${_PWD}) ..." > ${LOGFILE}
+    scp -p ${LOGFILE} ${LOG_HOST}/${LOG_DIR}
+fi
+
 set +e
 trap on_error ERR
 
@@ -97,12 +107,12 @@ if [ -n "${tag}" ] ; then
 fi
 
 # If we're running on the build server then upload the files
-if [ `hostname` = "gnucash-win32" ]; then
+if [ `hostname` = ${BUILD_HOST} ]; then
   # Small hack to create the $TARGET_DIR on the webserver if it doesn't exist yet
   mkdir -p "$_OUTPUT_DIR/$TARGET_DIR"
-  scp -r "$_OUTPUT_DIR/$TARGET_DIR" upload at code.gnucash.org:public_html/win32
+  scp -r "$_OUTPUT_DIR/$TARGET_DIR" ${LOG_HOST}
   rmdir "$_OUTPUT_DIR/$TARGET_DIR"
   # Copy the files to the chosen target directory
-  scp -p ${LOGFILE} upload at code.gnucash.org:public_html/win32/$LOG_DIR
-  scp -p ${_OUTPUT_DIR}/${SETUP_FILENAME} upload at code.gnucash.org:public_html/win32/$TARGET_DIR
+  scp -p ${LOGFILE} ${LOG_HOST}/$LOG_DIR
+  scp -p ${_OUTPUT_DIR}/${SETUP_FILENAME} ${LOG_HOST}/$TARGET_DIR
 fi



Summary of changes:
 packaging/win32/build_package.sh     |  54 +++++++--------
 packaging/win32/build_package_git.sh | 108 -----------------------------
 packaging/win32/build_tags.sh        |  78 +++++++++++----------
 packaging/win32/build_tags_git.sh    | 128 -----------------------------------
 packaging/win32/daily_build.bat      |   8 +--
 packaging/win32/daily_build.sh       |  59 +++++++++-------
 packaging/win32/daily_build_git.sh   |  53 ---------------
 packaging/win32/weekly_build.sh      |  63 ++++++++++-------
 packaging/win32/weekly_build_git.sh  |  56 ---------------
 9 files changed, 145 insertions(+), 462 deletions(-)
 delete mode 100644 packaging/win32/build_package_git.sh
 delete mode 100644 packaging/win32/build_tags_git.sh
 mode change 100755 => 100644 packaging/win32/daily_build.sh
 delete mode 100644 packaging/win32/daily_build_git.sh
 delete mode 100644 packaging/win32/weekly_build_git.sh



More information about the gnucash-changes mailing list