Merge pull request #5050 from dotnet-bot/from-tfs
[platform/upstream/coreclr.git] / publish-packages.cmd
1 @if "%_echo%" neq "on" echo off
2 setlocal EnableDelayedExpansion
3
4 set packagesLog=publish-packages.log
5 echo Running publish-packages.cmd %* > %packagesLog%
6
7 set options=/nologo /v:minimal /flp:v=detailed;Append;LogFile=%packagesLog%
8 set allargs=%*
9
10 if /I [%1] == [/?] goto Usage
11 if /I [%1] == [/help] goto Usage
12
13 REM ensure that msbuild is available
14 echo Running init-tools.cmd
15 call %~dp0init-tools.cmd
16
17 echo msbuild.exe %~dp0src\publish.proj !options! !allargs! >> %packagesLog%
18 call msbuild.exe %~dp0src\publish.proj !options! !allargs!
19 if NOT [%ERRORLEVEL%]==[0] (
20   echo ERROR: An error occurred while publishing packages, see %packagesLog% for more details.
21   exit /b 1
22 )
23
24 echo Done publishing packages.
25 exit /b
26
27 :Usage
28 echo.
29 echo Publishes the NuGet packages to the specified location.
30 echo For publishing to Azure the following properties are required.
31 echo   /p:CloudDropAccountName="account name"
32 echo   /p:CloudDropAccessToken="access token"
33 echo   /p:__BuildType="Configuration Group"
34 echo   /p:__BuildArch="Architecture"
35 exit /b