forked from dotnet/jitutils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pack-coredistools.cmd
37 lines (29 loc) · 911 Bytes
/
pack-coredistools.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@echo off
setlocal EnableDelayedExpansion EnableExtensions
set RootDirectory=%~dp0
set SourcesDirectory=%RootDirectory%src
set PackagesDirectory=%RootDirectory%artifacts\pkg
set BinariesDirectory=%~f1
if "%BinariesDirectory%"=="" (
echo ERROR: Binaries directory is not specified
exit /b 1
) else if not exist "%BinariesDirectory%" (
echo ERROR: Binaries directory does not exist: %BinariesDirectory%
exit /b 1
)
where /q nuget.exe
if %ERRORLEVEL% neq 0 (
echo ERROR: nuget.exe is not found in the PATH
exit /b 1
)
nuget.exe pack ^
"%SourcesDirectory%\coredistools\.nuget\Microsoft.NETCore.CoreDisTools.nuspec" ^
-OutputDirectory "%PackagesDirectory%" ^
-BasePath %RootDirectory% ^
-Properties BinariesDirectory="%BinariesDirectory%" ^
-NonInteractive
if %ERRORLEVEL% neq 0 (
echo ERROR: nuget pack exited with code %ERRORLEVEL%
exit /b 1
)
exit /b 0