-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
57 additions
and
5 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
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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This script dispatches to the Ada patcher, after building it. | ||
|
||
# Set strict mode for PowerShell to exit on error | ||
$ErrorActionPreference = "Stop" | ||
|
||
$bin = "support/version_patcher/bin/version_patcher.exe" | ||
|
||
# If the binary is already in place, do nothing | ||
if (Test-Path $bin) { | ||
Write-Output "Patcher already built." | ||
} elseif (Get-Command gprbuild -ErrorAction SilentlyContinue) { | ||
Write-Output "Building patcher with gprbuild..." | ||
gprbuild -P support/version_patcher/version_patcher.gpr | ||
} elseif (Get-Command alr -ErrorAction SilentlyContinue) { | ||
Write-Output "Building patcher with alr..." | ||
alr -C (Split-Path $bin) build | ||
} else { | ||
Write-Output "WARNING: No Ada tool available to build patcher, skipping." | ||
exit 0 | ||
} | ||
|
||
& $bin @args | ||
|
||
Write-Output "Resulting version file:" | ||
Get-Content src/alire/alire-version.ads | Select-String "Current_Str" |
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
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
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