mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-04 22:07:40 +00:00
Improve build scripts and move them to scripts/
This commit is contained in:
parent
5d653a3342
commit
43abc56a41
9 changed files with 100 additions and 28 deletions
31
scripts/build.ps1
Normal file
31
scripts/build.ps1
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
cd "$PSScriptRoot/.."
|
||||
|
||||
$configuration = "Release"
|
||||
if ($args[0]) {
|
||||
$configuration = $args[0]
|
||||
}
|
||||
|
||||
$path = "build-$configuration"
|
||||
if ($args[1]) {
|
||||
$path = $args[1]
|
||||
}
|
||||
|
||||
$majorVer = Get-Content VERSION
|
||||
$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 "") {
|
||||
$nextVer = $lastVer.Split('.')
|
||||
$lastItem = $nextVer.Length-1
|
||||
$nextVer[$lastItem] = [int]$nextVer[$lastItem] + 1
|
||||
$nextVer = $nextVer -Join '.'
|
||||
} else {
|
||||
$nextVer="$majorVer.0"
|
||||
}
|
||||
|
||||
dotnet --list-sdks -or winget install Microsoft.DotNet.SDK.6
|
||||
dotnet build --configuration "$configuration" "/property:Version=$nextVer" --output "$path"
|
||||
Loading…
Add table
Add a link
Reference in a new issue