Skip to content

Commit 56c9158

Browse files
committed
git-artifacts: do build all i686 stuff for v2.48.* and earlier
The release trains up to, and including, v2.48.1 still ship with i686 variants of the installer and Portable Git. We need to build the full set of i686 artifacts for those embargoed releases, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent ad010e5 commit 56c9158

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

.github/workflows/git-artifacts.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,12 @@ jobs:
244244
ARTIFACTS_TO_BUILD="mingit"
245245
test "$ARCHITECTURE" = aarch64 || ARTIFACTS_TO_BUILD="$ARTIFACTS_TO_BUILD mingit-busybox"
246246
test -f bundle-artifacts/mingit-only || {
247-
test "$ARCHITECTURE" = i686 || ARTIFACTS_TO_BUILD="installer portable archive $ARTIFACTS_TO_BUILD"
247+
case "$ARCHITECTURE,$GIT_VERSION" in
248+
i686,v2.49*|i686,v2[5-9][0-9]*) ;; # only build MinGit for i686 Git 2.49+
249+
*)
250+
ARTIFACTS_TO_BUILD="installer portable archive $ARTIFACTS_TO_BUILD"
251+
;;
252+
esac
248253
test "$ARCHITECTURE" != x86_64 || ARTIFACTS_TO_BUILD="$ARTIFACTS_TO_BUILD nuget"
249254
}
250255
}
@@ -294,7 +299,11 @@ jobs:
294299
core.info('Preparing artifact build matrix...')
295300
const createArtifactsMatrix = require('./create-artifacts-matrix')
296301
try {
297-
const output = createArtifactsMatrix(process.env.ARTIFACTS_TO_BUILD, process.env.ARCHITECTURE)
302+
const output = createArtifactsMatrix(
303+
process.env.ARTIFACTS_TO_BUILD,
304+
process.env.ARCHITECTURE,
305+
${{ github.repository_visibility == 'private' && 'true' || 'false' }}
306+
)
298307
core.info(`Will be using the following matrix: ${JSON.stringify(output)}`)
299308
return output
300309
} catch (e) {
@@ -677,14 +686,19 @@ jobs:
677686
shell: pwsh
678687
run: |
679688
$exePath = Get-ChildItem -Path artifacts/*.exe | %{$_.FullName}
680-
$installer = Start-Process -PassThru -Wait -FilePath "$exePath" -ArgumentList "/SILENT /VERYSILENT /NORESTART /SUPPRESSMSGBOXES /ALLOWDOWNGRADE=1 /LOG=installer.log"
689+
$installer = Start-Process -PassThru -Wait -FilePath "$exePath" -ArgumentList "/SILENT /VERYSILENT /NORESTART /SUPPRESSMSGBOXES /ALLOWDOWNGRADE=1 /ALLOWINSTALLING32ON64=1 /LOG=installer.log"
681690
$exitCode = $installer.ExitCode
682691
if ($exitCode -ne 0) {
683692
Write-Host "::error::Installer failed with exit code $exitCode!"
684693
exit 1
685694
}
686-
"$env:ProgramFiles\Git\usr\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
687-
"$env:ProgramFiles\Git\${{env.MINGW_PREFIX}}\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
695+
if ("${env:ARCHITECTURE}" -eq "i686") {
696+
"${env:ProgramFiles(x86)}\Git\usr\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
697+
"${env:ProgramFiles(x86)}\Git\${{env.MINGW_PREFIX}}\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
698+
} else {
699+
"$env:ProgramFiles\Git\usr\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
700+
"$env:ProgramFiles\Git\${{env.MINGW_PREFIX}}\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
701+
}
688702
- name: Publish installer log
689703
if: matrix.artifact.name == 'installer' && (failure() || success())
690704
uses: actions/upload-artifact@v4

create-artifacts-matrix.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = (artifactsString, architecture) => {
1+
module.exports = (artifactsString, architecture, allowI686) => {
22
const artifacts = artifactsString.split(' ')
33

44
if (artifacts.length < 1) {
@@ -13,7 +13,7 @@ module.exports = (artifactsString, architecture) => {
1313
}
1414
]
1515

16-
if (architecture !== 'i686') validArtifacts.unshift({
16+
if (allowI686 || architecture !== 'i686') validArtifacts.unshift({
1717
name: 'installer',
1818
filePrefix: 'Git',
1919
fileExtension: 'exe'

github-release.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ const getGitArtifacts = async (
209209
const urls = await getWorkflowRunArtifactsURLs(context, token, owner, repo, workflowRunId)
210210
for (const artifact of artifacts) {
211211
if (architecture.name === 'aarch64' && artifact.name === 'mingit-busybox') continue
212-
if (architecture.name === 'i686' && !artifact.name.startsWith('mingit')) continue
213212
const name = `${artifact.name}-${architecture.name}`
213+
if (architecture.name === 'i686' && !artifact.name.startsWith('mingit') && !urls && !fs.existsSync(name)) continue
214214
context.log(`Downloading ${name}`)
215215
await downloadAndUnZip(token, urls[name], name)
216216

0 commit comments

Comments
 (0)