gnucash-on-windows master: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Wed Sep 25 14:19:19 EDT 2019
Updated via https://github.com/Gnucash/gnucash-on-windows/commit/05cc9a91 (commit)
via https://github.com/Gnucash/gnucash-on-windows/commit/035ef5d3 (commit)
from https://github.com/Gnucash/gnucash-on-windows/commit/ae8216f9 (commit)
commit 05cc9a91efc353e6e117c602f9f3e8896c342cca
Author: Geert Janssens <geert at kobaltwit.be>
Date: Wed Sep 25 20:19:12 2019 +0200
Test for installer generation failures and report them
diff --git a/buildserver/build_package.ps1 b/buildserver/build_package.ps1
index 33bf54e..f5630d8 100644
--- a/buildserver/build_package.ps1
+++ b/buildserver/build_package.ps1
@@ -134,19 +134,28 @@ if (test-path -path $install_manifest) {
#git.exe -C $script_unix pull --rebase 2>&1 | Tee-Object -FilePath $log_file -Append
# Build the latest GnuCash and all dependencies not installed via mingw64
bash.exe -lc "jhbuild --no-interact -f $script_unix/jhbuildrc build --clean 2>&1" | Tee-Object -FilePath $log_file -Append
+
+$setup_file_valid = False
$new_file = test-path -path $target_dir\$package\$branch\inst\bin\gnucash.exe -NewerThan $time_stamp
if ($new_file) {
#Build the installer
$is_git = ($branch.CompareTo("releases") -ne 0)
Write-Output "Creating GnuCash installer." | Tee-Object -FilePath $log_file -Append
$setup_file = & $script_dir\bundle-mingw64.ps1 -root_dir $target_dir -target_dir $target_dir\$package\$branch -package $package -git_build $is_git 2>&1 | Tee-Object -FilePath $log_file -Append
- $destination_dir="$target_dir\win32\$branch"
- New-Item -ItemType Directory -Force -Path "$destination_dir" | Out-Null
- Move-Item -Path "$setup_file" -Destination "$destination_dir"
- $pkg_name = Split-Path -Path "$setup_file" -Leaf
- $setup_file = "$destination_dir\$pkg_name"
- $setup_file = make-unixpath -path $setup_file
- Write-Output "Created GnuCash Setup File $setup_file" | Tee-Object -FilePath $log_file -Append
+ $setup_file_valid = Test-Path -Path "$setup_file"
+ if ($setup_file_valid) {
+ $destination_dir="$target_dir\win32\$branch"
+ New-Item -ItemType Directory -Force -Path "$destination_dir" | Out-Null
+ Move-Item -Path "$setup_file" -Destination "$destination_dir"
+ $pkg_name = Split-Path -Path "$setup_file" -Leaf
+ $setup_file = "$destination_dir\$pkg_name"
+ Write-Output "Created GnuCash Setup File $setup_file" | Tee-Object -FilePath $log_file -Append
+ }
+ else {
+ Write-Output "An error occurred while creating the GnuCash installer:" | Tee-Object -FilePath $log_file -Append
+ Write-Output "$setup_file" | Tee-Object -FilePath $log_file -Append
+ }
+
}
$time_stamp = get-date -format "yyyy-MM-dd HH:mm:ss"
@@ -155,7 +164,7 @@ Write-Output "Build Ended $time_stamp" | Tee-Object -FilePath $log_file -Append
# Copy the transcript and installer to the download server and delete them.
if ($hostname) {
bash.exe -lc "$script_unix/buildserver/upload_build_log.sh $log_unix $hostname $log_dir $branch 2>&1"
- if ($new_file) {
+ if ($setup_file_valid) {
bash.exe -lc "rsync.exe -e ssh -a $setup_file $hostname/$branch 2>&1"
}
}
commit 035ef5d367ec425ea35d5f441b6dfbd97819dbe5
Author: Geert Janssens <geert at kobaltwit.be>
Date: Wed Sep 25 17:25:20 2019 +0200
Store local and remote build artefacts in the same directory hierarchy
This will allow old file cleanup using rsync in the future
diff --git a/buildserver/build_package.ps1 b/buildserver/build_package.ps1
index ffd15e0..33bf54e 100644
--- a/buildserver/build_package.ps1
+++ b/buildserver/build_package.ps1
@@ -93,11 +93,14 @@ $target_unix = make-unixpath -path $target_dir
$log_dir = "build-logs"
#Make sure that there's no running transcript, then start one:
-$time_stamp = get-date -format "yyyy-MM-dd-HH-mm-ss"
-$log_file = "$target_dir\build-$branch-$time_stamp.log"
+$time_stamp_file = get-date -format "yyyy-MM-dd-HH-mm-ss"
+$yyyy_mm_dir = get-date -format "yyyy-MM"
+$log_dir_full = "$target_dir\win32\$log_dir\$branch\$yyyy_mm_dir"
+$log_file = "$log_dir_full\build-$branch-$time_stamp_file.log"
$log_unix = make-unixpath -path $log_file
-$time_stamp = get-date -format "yyyy-MM-dd HH:mm:ss"
+New-Item -ItemType Directory -Force -Path "$log_dir_full" | Out-Null
+$time_stamp = get-date -format "yyyy-MM-dd HH:mm:ss"
Write-Output "Build Started $time_stamp" | Tee-Object -FilePath $log_file
git.exe -C $script_unix pull 2>&1 | Tee-Object -FilePath $log_file -Append
#copy the file to the download server so that everyone can see we've started
@@ -137,6 +140,11 @@ if ($new_file) {
$is_git = ($branch.CompareTo("releases") -ne 0)
Write-Output "Creating GnuCash installer." | Tee-Object -FilePath $log_file -Append
$setup_file = & $script_dir\bundle-mingw64.ps1 -root_dir $target_dir -target_dir $target_dir\$package\$branch -package $package -git_build $is_git 2>&1 | Tee-Object -FilePath $log_file -Append
+ $destination_dir="$target_dir\win32\$branch"
+ New-Item -ItemType Directory -Force -Path "$destination_dir" | Out-Null
+ Move-Item -Path "$setup_file" -Destination "$destination_dir"
+ $pkg_name = Split-Path -Path "$setup_file" -Leaf
+ $setup_file = "$destination_dir\$pkg_name"
$setup_file = make-unixpath -path $setup_file
Write-Output "Created GnuCash Setup File $setup_file" | Tee-Object -FilePath $log_file -Append
}
Summary of changes:
buildserver/build_package.ps1 | 29 +++++++++++++++++++++++------
1 file changed, 23 insertions(+), 6 deletions(-)
More information about the gnucash-changes
mailing list