Skip to content

Commit

Permalink
Update build.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
ipvalverde authored Jul 12, 2024
1 parent 706007b commit e4468aa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ param (
[string] $packageVersion,

[Parameter(Mandatory=$true)]
[string] $releaseNotes
[string] $releaseNotes,

[Parameter(Mandatory=$true)]
[string] $isPreRelease
)

function Invoke-CommandWithLog {
Expand All @@ -25,6 +28,11 @@ Write-Host "`nGit version tag: '$packageVersion'`n"
if ($packageVersion.StartsWith("v")) {
$packageVersion = $packageVersion.Substring(1)
}
if ([System.Convert]::ToBoolean($isPreRelease)) {
$packageVersion += "-alpha"
}

Write-Host "Package version: $packageVersion" -ForegroundColor Yellow

Invoke-CommandWithLog -Command "dotnet build $solutionPath -c Release$packageVersionCommandArgument" -CommandName "build"
Invoke-CommandWithLog -Command "dotnet test $testProjectPath -c Release --no-build" -CommandName "test"
Expand Down

0 comments on commit e4468aa

Please sign in to comment.