-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test build pipeline to publish to internal ADO (#308)
* Fix issue in VC versioning * Publish to internal ADO feed to work around ADO lag * Modify build pipeline
- Loading branch information
Showing
2 changed files
with
48 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
@echo Off | ||
|
||
if /i "%~1" == "/?" Goto :Usage | ||
if /i "%~1" == "-?" Goto :Usage | ||
if /i "%~1" == "--help" Goto :Usage | ||
if /i "%~1" == "" Goto :Usage | ||
if /i "%~2" == "" Goto :Usage | ||
|
||
set ExitCode=0 | ||
set PackageDirectory=%~1 | ||
|
||
echo: | ||
echo [Uploading NuGet Packages] | ||
echo -------------------------------------------------- | ||
echo Package Directory : %PackageDirectory% | ||
echo Feed : %FeedUri% | ||
echo: | ||
|
||
for %%f in (%PackageDirectory%\*.nupkg) do ( | ||
call dotnet nuget push %%f --api-key %~2 --timeout 1200 --source https://msazure.pkgs.visualstudio.com/_packaging/CRC-VC/nuget/v3/index.json --skip-duplicate %~3 && echo: || Goto :Error | ||
) | ||
|
||
Goto :End | ||
|
||
|
||
:Usage | ||
echo Invalid Usage. | ||
echo Usage: | ||
echo %~0 {packageDirectory} {nugetApiKey} [{dotnet push args}] | ||
echo: | ||
echo Examples: | ||
echo %~0 S:\source\one\repo\out\bin\Release\x64\Packages apikey | ||
echo %~0 S:\source\one\repo\out\bin\Release\x64\Packages apikey --interactive | ||
Goto :End | ||
|
||
|
||
:Error | ||
set ExitCode=%ERRORLEVEL% | ||
|
||
|
||
:End | ||
rem Reset environment variables | ||
set PackageDirectory= | ||
set FeedUri= | ||
|
||
echo Build Stage Exit/Error Code: %ExitCode% | ||
exit /B %ExitCode% |