forked from scott-xu/EntityFramework.Testing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.bat
76 lines (60 loc) · 8.33 KB
/
build.bat
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
@echo off
reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath > nul 2>&1
if ERRORLEVEL 1 goto MissingMSBuildRegistry
for /f "skip=2 tokens=2,*" %%A in ('reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath') do SET MSBUILDDIR=%%B
IF NOT EXIST %MSBUILDDIR%nul goto MissingMSBuildToolsPath
IF NOT EXIST %MSBUILDDIR%msbuild.exe goto MissingMSBuildExe
::Unit Test
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq.Ninject.Tests\EntityFramework.Testing.Moq.Ninject.Tests.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq.Ninject.Tests\EntityFramework.Testing.Moq.Ninject.Tests.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.NSubstitute.Ninject.Tests\EntityFramework.Testing.NSubstitute.Ninject.Tests.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.NSubstitute.Ninject.Tests\EntityFramework.Testing.NSubstitute.Ninject.Tests.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq.Tests\EntityFramework.Testing.Moq.Tests.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq.Tests\EntityFramework.Testing.Moq.Tests.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.NSubstitute.Tests\EntityFramework.Testing.NSubstitute.Tests.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.NSubstitute.Tests\EntityFramework.Testing.NSubstitute.Tests.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\
"tools\xunit\xunit.console.clr4.exe" "src\EntityFramework.Testing.Moq.Ninject.Tests\bin\Release\net40\EntityFramework.Testing.Moq.Ninject.Tests.dll"
"tools\xunit\xunit.console.clr4.exe" "src\EntityFramework.Testing.Moq.Ninject.Tests\bin\Release\net45\EntityFramework.Testing.Moq.Ninject.Tests.dll"
"tools\xunit\xunit.console.clr4.exe" "src\EntityFramework.Testing.NSubstitute.Ninject.Tests\bin\Release\net40\EntityFramework.Testing.NSubstitute.Ninject.Tests.dll"
"tools\xunit\xunit.console.clr4.exe" "src\EntityFramework.Testing.NSubstitute.Ninject.Tests\bin\Release\net45\EntityFramework.Testing.NSubstitute.Ninject.Tests.dll"
"tools\xunit\xunit.console.clr4.exe" "src\EntityFramework.Testing.Moq.Tests\bin\Release\net40\EntityFramework.Testing.Moq.Tests.dll"
"tools\xunit\xunit.console.clr4.exe" "src\EntityFramework.Testing.Moq.Tests\bin\Release\net45\EntityFramework.Testing.Moq.Tests.dll"
"tools\xunit\xunit.console.clr4.exe" "src\EntityFramework.Testing.NSubstitute.Tests\bin\Release\net40\EntityFramework.Testing.NSubstitute.Tests.dll"
"tools\xunit\xunit.console.clr4.exe" "src\EntityFramework.Testing.NSubstitute.Tests\bin\Release\net45\EntityFramework.Testing.NSubstitute.Tests.dll"
::BUILD
"tools\nuget\nuget.exe" restore EntityFramework.Testing.sln
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq.Ninject\EntityFramework.Testing.Moq.Ninject.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\;DocumentationFile=bin\Release\net40\EntityFramework.Testing.Moq.Ninject.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq.Ninject\EntityFramework.Testing.Moq.Ninject.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\EntityFramework.Testing.Moq.Ninject.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.NSubstitute.Ninject\EntityFramework.Testing.NSubstitute.Ninject.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\;DocumentationFile=bin\Release\net40\EntityFramework.Testing.NSubstitute.Ninject.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.NSubstitute.Ninject\EntityFramework.Testing.NSubstitute.Ninject.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\EntityFramework.Testing.NSubstitute.Ninject.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Ninject\EntityFramework.Testing.Ninject.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\;DocumentationFile=bin\Release\net40\EntityFramework.Testing.Ninject.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Ninject\EntityFramework.Testing.Ninject.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\EntityFramework.Testing.Ninject.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq\EntityFramework.Testing.Moq.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\;DocumentationFile=bin\Release\net40\EntityFramework.Testing.Moq.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq\EntityFramework.Testing.Moq.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\EntityFramework.Testing.Moq.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.NSubstitute\EntityFramework.Testing.NSubstitute.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\;DocumentationFile=bin\Release\net40\EntityFramework.Testing.NSubstitute.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.NSubstitute\EntityFramework.Testing.NSubstitute.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\EntityFramework.Testing.NSubstitute.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing\EntityFramework.Testing.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\;DocumentationFile=bin\Release\net40\EntityFramework.Testing.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing\EntityFramework.Testing.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\EntityFramework.Testing.xml
mkdir build
del "build\*.nupkg"
::PACK
"tools\nuget\nuget.exe" pack "src\EntityFramework.Testing\EntityFramework.Testing.nuspec" -OutputDirectory build
"tools\nuget\nuget.exe" pack "src\EntityFramework.Testing.Moq\EntityFramework.Testing.Moq.nuspec" -OutputDirectory build
"tools\nuget\nuget.exe" pack "src\EntityFramework.Testing.NSubstitute\EntityFramework.Testing.NSubstitute.nuspec" -OutputDirectory build
"tools\nuget\nuget.exe" pack "src\EntityFramework.Testing.Ninject\EntityFramework.Testing.Ninject.nuspec" -OutputDirectory build
"tools\nuget\nuget.exe" pack "src\EntityFramework.Testing.Moq.Ninject\EntityFramework.Testing.Moq.Ninject.nuspec" -OutputDirectory build
"tools\nuget\nuget.exe" pack "src\EntityFramework.Testing.NSubstitute.Ninject\EntityFramework.Testing.NSubstitute.Ninject.nuspec" -OutputDirectory build
::DEPLOY
"tools\nuget\nuget.exe" push "build\*.nupkg"
goto:eof
::ERRORS
::---------------------
:MissingMSBuildRegistry
echo Cannot obtain path to MSBuild tools from registry
goto:eof
:MissingMSBuildToolsPath
echo The MSBuild tools path from the registry '%MSBUILDDIR%' does not exist
goto:eof
:MissingMSBuildExe
echo The MSBuild executable could not be found at '%MSBUILDDIR%'
goto:eof