You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2025/02/27 14:22:13 UTC
(couchdb-glazier) branch fix-lastexitcode-powershell created (now ee98df6)
This is an automated email from the ASF dual-hosted git repository.
ronny pushed a change to branch fix-lastexitcode-powershell
in repository https://gitbox.apache.org/repos/asf/couchdb-glazier.git
at ee98df6 Call git command earlier
This branch includes the following new commits:
new ee98df6 Call git command earlier
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(couchdb-glazier) 01/01: Call git command earlier
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ronny pushed a commit to branch fix-lastexitcode-powershell
in repository https://gitbox.apache.org/repos/asf/couchdb-glazier.git
commit ee98df6cd9917ff1febf54b16bd088a7fc59374f
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Thu Feb 27 15:18:50 2025 +0100
Call git command earlier
The git command `git rev-parse ...` could return on exit code not equal
to zero, which will result in a failing Windows CI step, because it's
the last "command" of the script. Cmdlet's often have no return codes.
Move the command up in the chain to resolve this.
---
bin/build_installer.ps1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/build_installer.ps1 b/bin/build_installer.ps1
index 2090171..3334ed2 100644
--- a/bin/build_installer.ps1
+++ b/bin/build_installer.ps1
@@ -68,6 +68,7 @@ $Glazier = "${PSScriptRoot}\.."
$VersionMK = Get-Content -Path "$CouchDB_Root\version.mk" | Out-String | ConvertFrom-StringData
$CouchDBVersion = $VersionMK.vsn_major,$VersionMK.vsn_minor,$VersionMK.vsn_patch -join "."
+$GitSha = git rev-parse --short HEAD 2>$null
$CouchDBDistGitSha = $VersionMK.git_sha
$RelNotesVersion = $CouchDBVersion -replace "^(\d+\.\d+)\..*", '$1'
@@ -132,7 +133,6 @@ Move-Item -Path "${CouchDB}\etc\vm.args.dist" -Destination "${CouchDB}\etc\vm.ar
Move-Item -Path "${Glazier}\installer\apache-couchdb-${CouchDBVersion}.msi" -Destination "." -Force
if($IncludeGitSha) {
- $GitSha = & git rev-parse --short HEAD 2>$null
if ($GitSha.Length -gt 0) { # Fetch git sha from git directory itself
Rename-Item -Path "apache-couchdb-${CouchDBVersion}.msi" -NewName "apache-couchdb-${CouchDBVersion}-${GitSha}.msi"
} elseif ($CouchDBDistGitSha -gt 0) { # Fetch git sha from version.mk within dist directory