diff --git a/CreateLayoutDirectory.cmd b/CreateLayoutDirectory.cmd new file mode 100644 index 0000000..56243de --- /dev/null +++ b/CreateLayoutDirectory.cmd @@ -0,0 +1,58 @@ +::Build NuGet packages step +@ECHO off +SETLOCAL + +set BinaryOutputDirectory=%1 +set Configuration=%2 +set Platform=%3 + +if "%BinaryOutputDirectory%" EQU "" ( +set BinaryOutputDirectory=%~dp0bld\bin +) + +if "%Configuration%" EQU "" ( +set Configuration=Release +) + +if "%Platform%" EQU "" ( +set Platform=AnyCPU +) + +set BinaryOutputDirectory=%BinaryOutputDirectory%\%Platform%_%Configuration%\ +set LayoutForSigningDirectory=%BinaryOutputDirectory%\..\LayoutForSigning + +call :CreateDirIfNotExist %LayoutForSigningDirectory% +call :CreateDirIfNotExist %LayoutForSigningDirectory%\net461\ +call :CreateDirIfNotExist %LayoutForSigningDirectory%\netcoreapp2.0 + +call :CopyFilesForMultitargeting Json.Schema.dll || goto :ExitFailed +call :CopyFilesForMultitargeting Json.Pointer.dll || goto :ExitFailed +call :CopyFilesForMultitargeting Json.Schema.ToDotNet.dll || goto :ExitFailed +call :CopyFilesForMultitargeting Json.Schema.Validation.dll || goto :ExitFailed + +goto :Exit + +:CopyFilesForMultitargeting +echo xcopy /Y %BinaryOutputDirectory%\%~n1\netstandard2.0\%1 %LayoutForSigningDirectory%\netcoreapp2.0\ +xcopy /Y %BinaryOutputDirectory%\%~n1\netstandard2.0\Microsoft.%1 %LayoutForSigningDirectory%\netcoreapp2.0\ +if "%ERRORLEVEL%" NEQ "0" (echo %1 assembly copy failed. && goto :CopyFilesExit) + +echo xcopy /Y %BinaryOutputDirectory%\%~n1\net461\Microsoft.%1 %LayoutForSigningDirectory%\netcoreapp2.0\ +xcopy /Y %BinaryOutputDirectory%\%~n1\net461\Microsoft.%1 %LayoutForSigningDirectory%\netcoreapp2.0\ +if "%ERRORLEVEL%" NEQ "0" (echo %1 assembly copy failed. && goto :CopyFilesExit) + + +:CopyFilesExit +Exit /B %ERRORLEVEL% + +:CreateDirIfNotExist +set dir=%~1 +if not exist %dir% (md %dir%) +Exit /B %ERRORLEVEL% + +:ExitFailed +@echo. +@echo Create layout directory step failed. +exit /b 1 + +:Exit \ No newline at end of file diff --git a/src/build.props b/src/build.props index 49b1aa9..74effab 100644 --- a/src/build.props +++ b/src/build.props @@ -10,9 +10,9 @@ - Microsoft Corporation + Microsoft JSON Schema - Copyright (c) Microsoft. All Rights Reserved. + © Microsoft Corporation. All rights reserved. 0.56.0 @@ -24,7 +24,7 @@ $(RootNamespaceOverride) $(Platform)_$(Configuration) $(MsBuildThisFileDirectory)..\bld\obj\$(MSBuildProjectName)\$(OutputSubDir)\ - $(MsBuildThisFileDirectory)..\bld\bin\$(MSBuildProjectName)\$(OutputSubDir)\ + $(MsBuildThisFileDirectory)..\bld\bin\$(OutputSubDir)\$(MSBuildProjectName)\ @@ -35,9 +35,11 @@ $(AssemblyName) $(Company) + $(Company),tse-securitytools false https://github.com/Microsoft/jschema/blob/master/License.txt https://github.com/Microsoft/jschema + https://go.microsoft.com/fwlink/?linkid=2009431