-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(portable): when building Portable Git, also test it
Just like the installer, we can run the Portable Git self-extractor and validate that it works as intended. Signed-off-by: Johannes Schindelin <[email protected]>
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,6 +181,30 @@ jobs: | |
# cannot test SSH keys in read-only mode, skip test for now | ||
sed -i 's|[email protected]:v3/git-for-windows/git/git|https://github.com/git/git|' $checklist && | ||
sh -x $checklist | ||
- name: extract Portable Git | ||
if: matrix.directory == 'portable' | ||
shell: pwsh | ||
run: | | ||
$exePath = Get-ChildItem -Path ${{ steps.build.outputs.result }}/*.7z.exe | %{$_.FullName} | ||
Get-ChildItem -Path "$exePath" | ||
$installer = Start-Process -PassThru -Wait -FilePath "$exePath" -ArgumentList "-o portable-git -y" | ||
$exitCode = $installer.ExitCode | ||
if ($exitCode -ne 0) { | ||
Write-Host "::error::Extracting the Portable Git failed with exit code $exitCode!" | ||
exit 1 | ||
} | ||
Get-ChildItem -Path "portable-git" | ||
"$PWD\portable-git\usr\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH | ||
"$PWD\portable-git\mingw64\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH | ||
- name: validate | ||
if: matrix.directory == 'portable' | ||
shell: bash | ||
run: | | ||
set -x && | ||
root="$(cygpath -aw /)" && | ||
test "${root%portable-git}" != "$root" && | ||
git.exe version --build-options >version && | ||
cat version | ||
sdk-artifacts: | ||
needs: determine-packages | ||
if: needs.determine-packages.outputs.test-sdk-artifacts == 'true' | ||
|