mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-02-04 14:44:22 +01:00
Ignore git if not installed when running build.ps1
This commit is contained in:
parent
c2f37dedd9
commit
ffcdd8f82c
|
|
@ -11,14 +11,16 @@ if ($args[1]) {
|
|||
}
|
||||
|
||||
$majorVer = Get-Content VERSION
|
||||
$lastVer = git tag --sort version:refname --list "$majorVer.*" | Select -last 1
|
||||
if (Get-Command "git.exe" -ErrorAction SilentlyContinue) {
|
||||
$lastVer = git tag --sort version:refname --list "$majorVer.*" | Select -last 1
|
||||
}
|
||||
|
||||
echo "Configuration: $configuration"
|
||||
echo "BuildPath: $path"
|
||||
echo "Major: $majorVer"
|
||||
echo "lastVer: $lastVer"
|
||||
|
||||
if ($lastVer -ne "") {
|
||||
if ($lastVer) {
|
||||
$nextVer = $lastVer.Split('.')
|
||||
$lastItem = $nextVer.Length-1
|
||||
$nextVer[$lastItem] = [int]$nextVer[$lastItem] + 1
|
||||
|
|
@ -26,6 +28,7 @@ if ($lastVer -ne "") {
|
|||
} else {
|
||||
$nextVer="$majorVer.0"
|
||||
}
|
||||
echo "nextVer: $nextVer"
|
||||
|
||||
dotnet --list-sdks -or winget install Microsoft.DotNet.SDK.6
|
||||
dotnet build --configuration "$configuration" "/property:Version=$nextVer" --output "$path"
|
||||
|
|
|
|||
Loading…
Reference in a new issue