diff --git a/packaging/win32/build_package.sh b/packaging/win32/build_package.sh index 792358f5e1..779510707b 100644 --- a/packaging/win32/build_package.sh +++ b/packaging/win32/build_package.sh @@ -10,7 +10,7 @@ set -e function on_error() { 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 exit } @@ -22,13 +22,29 @@ 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${tag:+-${tag}}-`date +'%Y-%m-%d'`.log +LOGFILENAME=build-${LOG_TAG}-`date +'%Y-%m-%d'`.log _OUTPUT_DIR=`unix_path $OUTPUT_DIR` LOGFILE=${_OUTPUT_DIR}/${LOGFILENAME} 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 trap on_error ERR @@ -77,16 +93,11 @@ fi # If we're running on the build server then upload the files # Note: change this target if you're building a different branch 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 mkdir "$TMP_DIR/$TARGET_DIR" scp -r "$TMP_DIR/$TARGET_DIR" upload@code.gnucash.org:public_html/win32 rmdir "$TMP_DIR/$TARGET_DIR" # 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 diff --git a/packaging/win32/daily_build.bat b/packaging/win32/daily_build.bat index 0afca3a1c6..848378553f 100644 --- a/packaging/win32/daily_build.bat +++ b/packaging/win32/daily_build.bat @@ -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) c:\msys\1.0\bin\sh.exe --login c:\soft\packaging\build_tags.sh 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 \ No newline at end of file +c:\msys\1.0\bin\sh.exe --login c:\soft-2.4\packaging\weekly_build.sh \ No newline at end of file