gnucash-on-windows master: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Wed Sep 25 07:03:18 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash-on-windows/commit/77e3d9e1 (commit)
	 via  https://github.com/Gnucash/gnucash-on-windows/commit/533ac3b0 (commit)
	from  https://github.com/Gnucash/gnucash-on-windows/commit/709e278f (commit)



commit 77e3d9e1d25d305b4fa4ec419f600b2aac2144a4
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Wed Sep 25 13:03:11 2019 +0200

    Update aqbanking to latest beta (5.99.34beta)

diff --git a/gnucash.modules b/gnucash.modules
index 1c445e6..b0ea074 100644
--- a/gnucash.modules
+++ b/gnucash.modules
@@ -178,7 +178,7 @@
 
   <autotools id="aqbanking" autogen-sh="autoreconf" makeargs="-j1"
 	     autogenargs="--enable-local-install">
-    <branch module="145/aqbanking-5.99.33beta.tar.gz" repo="aqbanking" version="5.99.33beta" >
+    <branch module="157/aqbanking-5.99.34beta.tar.gz" repo="aqbanking" version="5.99.34beta" >
       <patch file="aqbanking-5.99-strndup.patch" strip="1"/>
       <patch file="aqbanking-5.99.33beta-mconsole.patch" strip="1"/>
     </branch>

commit 533ac3b055c2e92272472b494f87bad7ecf55064
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sun Sep 22 13:27:39 2019 +0200

    Bash tweaks in server script
    
    * use bash directly instead of via Send-Process
    * drop bash for commands that don't need it
    * use powershell redirection (which is pretty much like bash redirection)
    * use powershell native Write-Output command for simple text message
      rather than making a detour via 'bash -lc echo'
    
    Notes on the redirection
    * sometimes the bash command still includes the error redirection
      This is because powershell make error output much more verbose
      and I wasn't sure that was adding much useful info.
    * Powershell redirections don't work with Write-Host. They
      do work with Write-Output so I have replaced those.

diff --git a/buildserver/build_package.ps1 b/buildserver/build_package.ps1
index a4f4242..198c010 100644
--- a/buildserver/build_package.ps1
+++ b/buildserver/build_package.ps1
@@ -65,19 +65,22 @@ $progressPreference = 'silentlyContinue'
 $env:MSYSTEM = 'MINGW32'
 $env:TERM = 'dumb' #Prevent escape codes in the log.
 $env:TARGET = "$package-$branch"
+# This allows us to run Msys2 commands such as bash.exe directly
+$Env:Path = "$Env:Path;$target_dir\msys2\usr\bin"
 
 if ($PSVersionTable.PSVersion.Major -ge 3) {
     $PSDefaultParameterValues['*:Encoding'] = 'utf8'
-    }
+}
+
+if (!(test-path -path $target_dir\msys2\usr\bin\bash.exe)) {
+    Write-Output "Shell program not found, aborting."
+    Exit 1
+}
 
 function bash-command() {
     param ([string]$command = "")
-    if (!(test-path -path $target_dir\msys2\usr\bin\bash.exe)) {
-	write-host "Shell program not found, aborting."
-	return
-    }
-    #write-host "Running bash command ""$command"""
-    Start-Process -FilePath "$target_dir\msys2\usr\bin\bash.exe" -ArgumentList "-lc ""$command""" -NoNewWindow -Wait
+    #Write-Output "Running bash command ""$command"""
+    bash.exe -lc "$command 2>&1"
 }
 
 function make-unixpath([string]$path) {
@@ -95,15 +98,15 @@ $log_file = "$target_dir\build-$branch-$time_stamp.log"
 $log_unix = make-unixpath -path $log_file
 $time_stamp = get-date -format "yyyy-MM-dd HH:mm:ss"
 
-bash-command -command "cd $script_unix && git pull"
-bash-command -command "echo Build Started $time_stamp > $log_unix"
+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
 if ($hostname) {
-    bash-command -command "$script_unix/buildserver/upload_build_log.sh $log_unix $hostname $log_dir $branch"
+    bash.exe -lc "$script_unix/buildserver/upload_build_log.sh $log_unix $hostname $log_dir $branch"
 }
 
 # Update MinGW-w64
-bash-command -command "pacman -Su --noconfirm > >(tee -a $log_unix) 2>&1"
+pacman.exe -Su --noconfirm 2>&1 | Tee-Object -FilePath $log_file -Append
 
 #GnuCash build still behaves badly if it finds its old build products. Clean them out.
 if ($branch -eq "releases") {
@@ -124,26 +127,27 @@ if (test-path -path $install_manifest) {
 }
 
 # Update the gnucash-on-windows repository
-#bash-command -command "cd $script_unix && git reset --hard && git pull --rebase"
+#git.exe -C $script_unix reset --hard 2>&1 | Tee-Object -FilePath $log_file -Append
+#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-command -command "jhbuild --no-interact -f $script_unix/jhbuildrc build --clean > >(tee -a $log_unix) 2>&1"
+bash.exe -lc "jhbuild --no-interact -f $script_unix/jhbuildrc build --clean 2>&1" | Tee-Object -FilePath $log_file -Append
 $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)
-    bash-command -command "echo 'Creating GnuCash installer.' > >(tee -a $log_unix)"
+    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
     $setup_file = make-unixpath -path $setup_file
-    write-host "Created GnuCash Setup File $setup_file"
+    Write-Output "Created GnuCash Setup File $setup_file" | Tee-Object -FilePath $log_file -Append
 }
 
 $time_stamp = get-date -format "yyyy-MM-dd HH:mm:ss"
-bash-command -command "echo Build Ended $time_stamp >> $log_unix"
+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-command -command "$script_unix/buildserver/upload_build_log.sh $log_unix $hostname $log_dir $branch"
+    bash.exe -lc "$script_unix/buildserver/upload_build_log.sh $log_unix $hostname $log_dir $branch 2>&1"
     if ($new_file) {
-	bash-command -command "rsync -e ssh -a $setup_file $hostname/$branch"
+        rsync.exe -e ssh -a "$setup_file $hostname/$branch" 2>&1
     }
 }



Summary of changes:
 buildserver/build_package.ps1 | 40 ++++++++++++++++++++++------------------
 gnucash.modules               |  2 +-
 2 files changed, 23 insertions(+), 19 deletions(-)



More information about the gnucash-changes mailing list