-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
4 changed files
with
62 additions
and
13 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,32 @@ | ||
pushd $PSScriptRoot\.. | ||
|
||
Get-Item .\artifacts\x64\gsudo.exe > $null || $(throw "Missing binaries/artifacts") | ||
|
||
if ($env:version) { | ||
"- Getting version from env:version" | ||
$version = $env:version | ||
$version_MajorMinorPatch=$env:version_MajorMinorPatch | ||
} else { | ||
"- Getting version using GitVersion" | ||
$version = $(gitversion /showvariable LegacySemVer) | ||
$version_MajorMinorPatch=$(gitversion /showvariable MajorMinorPatch) | ||
} | ||
"- Using version number v$version / v$version_MajorMinorPatch" | ||
|
||
"- Cleaning Nuget template folder" | ||
git clean .\Build\Nuget\gsudo -xf | ||
|
||
"- Generate gsudo.nuspec" | ||
(Get-Content Build\Nuget\gsudo.nuspec.template) -replace '#VERSION#', "$version" | Out-File -encoding UTF8 .\Build\Nuget\gsudo.nuspec | ||
|
||
|
||
"- Packing v$version to nuget" | ||
mkdir Artifacts\Nuget -Force > $null | ||
& nuget pack .\Build\Nuget\gsudo.nuspec -OutputDirectory "$((get-item Artifacts\Nuget).FullName)" || $(throw "Nuget pack failed.") | ||
|
||
"`n- Uploading v$version to Nuget" | ||
nuget push artifacts\nuget\gsudo.$($version).nupkg -Source https://api.nuget.org/v3/index.json || $(throw "Nuget push failed.") | ||
|
||
|
||
"- Success" | ||
popd |
This file was deleted.
Oops, something went wrong.