2018-08-14 00:32:03 +03:00
|
|
|
::Build NuGet packages step
|
|
|
|
@ECHO off
|
|
|
|
SETLOCAL
|
|
|
|
|
|
|
|
set BinaryOutputDirectory=%1
|
|
|
|
set Configuration=%1
|
|
|
|
set Platform=%2
|
|
|
|
|
|
|
|
if "%BinaryOutputDirectory%" EQU "" (
|
|
|
|
set BinaryOutputDirectory=.\bld\bin\
|
|
|
|
)
|
|
|
|
|
|
|
|
if "%Configuration%" EQU "" (
|
|
|
|
set Configuration=Release
|
|
|
|
)
|
|
|
|
|
|
|
|
if "%Platform%" EQU "" (
|
|
|
|
set Platform=AnyCpu
|
|
|
|
)
|
|
|
|
|
|
|
|
set BinaryOutputDirectory=%BinaryOutputDirectory%\%Platform%_%Configuration%\
|
|
|
|
set SigningDirectory=%BinaryOutputDirectory%\..\Signing
|
|
|
|
|
2018-08-30 02:00:18 +03:00
|
|
|
:: Copy all signed assemblies to the build output directory
|
|
|
|
call :CopySignedLibraryToBuildOutputDirectory Json.Schema.dll || goto :ExitFailed
|
|
|
|
call :CopySignedLibraryToBuildOutputDirectory Json.Pointer.dll || goto :ExitFailed
|
|
|
|
call :CopySignedLibraryToBuildOutputDirectory Json.Schema.ToDotNet.dll || goto :ExitFailed
|
|
|
|
call :CopySignedLibraryToBuildOutputDirectory Json.Schema.Validation.dll || goto :ExitFailed
|
2018-08-29 17:21:03 +03:00
|
|
|
|
2018-08-30 02:00:18 +03:00
|
|
|
call :CopySignedExecutableToBuildOutputDirectory Json.Schema.ToDotNet.Cli || goto :ExitFailed
|
|
|
|
call :CopySignedExecutableToBuildOutputDirectory Json.Schema.Validation.Cli || goto :ExitFailed
|
2018-08-14 00:32:03 +03:00
|
|
|
|
|
|
|
goto :Exit
|
|
|
|
|
2018-08-30 02:00:18 +03:00
|
|
|
:CopySignedLibraryToBuildOutputDirectory
|
2018-08-14 00:32:03 +03:00
|
|
|
|
2022-02-24 03:18:51 +03:00
|
|
|
xcopy /Y %SigningDirectory%\netcoreapp3.1\Microsoft.%1 %BinaryOutputDirectory%\%~n1\netstandard2.0\
|
2018-08-14 00:32:03 +03:00
|
|
|
if "%ERRORLEVEL%" NEQ "0" (echo %1 assembly copy failed. && goto :CopyFilesExit)
|
|
|
|
|
|
|
|
xcopy /Y %SigningDirectory%\net461\Microsoft.%1 %BinaryOutputDirectory%\%~n1\net461\
|
2018-08-30 02:00:18 +03:00
|
|
|
if "%ERRORLEVEL%" NEQ "0" (echo %1 assembly copy failed.)
|
|
|
|
goto :CopyFilesExit
|
2018-08-29 17:21:03 +03:00
|
|
|
|
2018-08-30 02:00:18 +03:00
|
|
|
:CopySignedExecutableToBuildOutputDirectory
|
2018-08-29 17:21:03 +03:00
|
|
|
|
2022-02-24 03:18:51 +03:00
|
|
|
xcopy /Y %SigningDirectory%\netcoreapp3.1\Microsoft.%1.dll %BinaryOutputDirectory%\%1\netstandard2.0\
|
2018-08-29 17:21:03 +03:00
|
|
|
if "%ERRORLEVEL%" NEQ "0" (echo %1 assembly copy failed. && goto :CopyFilesExit)
|
|
|
|
|
|
|
|
xcopy /Y %SigningDirectory%\net461\Microsoft.%1.exe %BinaryOutputDirectory%\%1\net461\
|
2018-08-30 02:00:18 +03:00
|
|
|
if "%ERRORLEVEL%" NEQ "0" (echo %1 assembly copy failed.)
|
2018-08-14 00:32:03 +03:00
|
|
|
|
2018-08-30 02:00:18 +03:00
|
|
|
:CopyFilesExit
|
2018-08-14 00:32:03 +03:00
|
|
|
Exit /B %ERRORLEVEL%
|
|
|
|
|
|
|
|
:ExitFailed
|
|
|
|
@echo.
|
|
|
|
@echo Build NuGet packages from layout directory step failed.
|
|
|
|
exit /b 1
|
|
|
|
|
|
|
|
:Exit
|