2020-09-29 01:33:54 +03:00
|
|
|
@echo off
|
|
|
|
setlocal EnableDelayedExpansion EnableExtensions
|
|
|
|
|
|
|
|
set RootDirectory=%~dp0
|
|
|
|
set SourcesDirectory=%RootDirectory%src
|
|
|
|
set PackagesDirectory=%RootDirectory%artifacts\pkg
|
|
|
|
|
2020-11-07 05:43:25 +03:00
|
|
|
set BinariesDirectory=%~f1
|
2020-09-29 01:33:54 +03:00
|
|
|
|
2020-11-07 05:43:25 +03:00
|
|
|
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%
|
2020-09-29 01:33:54 +03:00
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
|
2020-11-07 05:43:25 +03:00
|
|
|
where /q nuget.exe
|
2020-09-29 01:33:54 +03:00
|
|
|
|
|
|
|
if %ERRORLEVEL% neq 0 (
|
2020-11-07 05:43:25 +03:00
|
|
|
echo ERROR: nuget.exe is not found in the PATH
|
2020-09-29 01:33:54 +03:00
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
|
|
|
|
nuget.exe pack ^
|
2020-11-07 05:43:25 +03:00
|
|
|
"%SourcesDirectory%\coredistools\.nuget\Microsoft.NETCore.CoreDisTools.nuspec" ^
|
2020-09-29 01:33:54 +03:00
|
|
|
-OutputDirectory "%PackagesDirectory%" ^
|
|
|
|
-BasePath %RootDirectory% ^
|
|
|
|
-Properties BinariesDirectory="%BinariesDirectory%" ^
|
|
|
|
-NonInteractive
|
|
|
|
|
2020-11-07 05:43:25 +03:00
|
|
|
if %ERRORLEVEL% neq 0 (
|
|
|
|
echo ERROR: nuget pack exited with code %ERRORLEVEL%
|
|
|
|
exit /b 1
|
|
|
|
)
|
2020-09-29 01:33:54 +03:00
|
|
|
|
|
|
|
exit /b 0
|