Windows build: fix weekly 2.4 build and move log files into separate directory

BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20475 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2011-03-24 21:50:01 +00:00
parent 0775d8d8c2
commit 9d1ce4f716
2 changed files with 21 additions and 10 deletions

View File

@ -10,7 +10,7 @@ set -e
function on_error() { function on_error() {
if [ `hostname` = "gnucash-win32" ]; then if [ `hostname` = "gnucash-win32" ]; then
scp -p ${LOGFILE} upload@code.gnucash.org:public_html/win32/trunk scp -p ${LOGFILE} upload@code.gnucash.org:public_html/win32/build-logs
fi fi
exit exit
} }
@ -22,13 +22,29 @@ tag="$1"
. functions.sh . functions.sh
. defaults.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 set_default OUTPUT_DIR $GLOBAL_DIR\\output
LOGFILENAME=build${tag:+-${tag}}-`date +'%Y-%m-%d'`.log LOGFILENAME=build-${LOG_TAG}-`date +'%Y-%m-%d'`.log
_OUTPUT_DIR=`unix_path $OUTPUT_DIR` _OUTPUT_DIR=`unix_path $OUTPUT_DIR`
LOGFILE=${_OUTPUT_DIR}/${LOGFILENAME} LOGFILE=${_OUTPUT_DIR}/${LOGFILENAME}
mkdir -p ${_OUTPUT_DIR} mkdir -p ${_OUTPUT_DIR}
if [ `hostname` = "gnucash-win32" ]; then
# Small hack to create the build-logs directory if it doesn't exist yet
mkdir "$TMP_DIR/build-logs"
scp -r "$TMP_DIR/build-logs" upload@code.gnucash.org:public_html/win32
rmdir "$TMP_DIR/build-logs"
fi
set +e set +e
trap on_error ERR trap on_error ERR
@ -77,16 +93,11 @@ fi
# If we're running on the build server then upload the files # If we're running on the build server then upload the files
# Note: change this target if you're building a different branch # Note: change this target if you're building a different branch
if [ `hostname` = "gnucash-win32" ]; then if [ `hostname` = "gnucash-win32" ]; then
# Determine where to upload to
if $(echo $REPOS_URL | grep -q tags); then
TARGET_DIR=releases
else
TARGET_DIR=${REPOS_URL##*/}
fi
# Small hack to create the target directory if it doesn't exist yet # Small hack to create the target directory if it doesn't exist yet
mkdir "$TMP_DIR/$TARGET_DIR" mkdir "$TMP_DIR/$TARGET_DIR"
scp -r "$TMP_DIR/$TARGET_DIR" upload@code.gnucash.org:public_html/win32 scp -r "$TMP_DIR/$TARGET_DIR" upload@code.gnucash.org:public_html/win32
rmdir "$TMP_DIR/$TARGET_DIR" rmdir "$TMP_DIR/$TARGET_DIR"
# Copy the files to the chosen target directory # Copy the files to the chosen target directory
scp -p ${LOGFILE} ${_OUTPUT_DIR}/${SETUP_FILENAME} upload@code.gnucash.org:public_html/win32/$TARGET_DIR scp -p ${LOGFILE} upload@code.gnucash.org:public_html/win32/build-logs
scp -p ${_OUTPUT_DIR}/${SETUP_FILENAME} upload@code.gnucash.org:public_html/win32/$TARGET_DIR
fi fi

View File

@ -9,4 +9,4 @@ c:\msys\1.0\bin\sh.exe --login c:\soft\packaging\daily_build.sh
rem Tags build (daily -- only tags that weren't built yet) rem Tags build (daily -- only tags that weren't built yet)
c:\msys\1.0\bin\sh.exe --login c:\soft\packaging\build_tags.sh c:\msys\1.0\bin\sh.exe --login c:\soft\packaging\build_tags.sh
rem 2.4 branch build (weekly) rem 2.4 branch build (weekly)
c:\msys\1.0\bin\sh.exe --login c:\soft\packaging\daily_build.sh c:\soft-2.4\packaging c:\msys\1.0\bin\sh.exe --login c:\soft-2.4\packaging\weekly_build.sh