|
1 | | -set bin="c:\Bin" |
| 1 | +set sourceFolder=%~dp0 |
| 2 | +set dropFolder=%~dp0 |
2 | 3 |
|
3 | | -if not exist "%bin%" mkdir %bin% || goto failFast |
| 4 | +( |
| 5 | +set /p versionParam= |
| 6 | +)<%sourceFolder%version.txt |
4 | 7 |
|
5 | | -if "%1"=="NoBuild" goto noBuild |
| 8 | +echo %versionParam% |
6 | 9 |
|
7 | | -pushd %~dp0 |
8 | | - |
9 | | -msbuild Tx.sln /p:Configuration=Release45 /p:Platform="Any CPU" || goto failFast |
10 | | -msbuild Tx.sln /p:Configuration=Debug45 /p:Platform="Any CPU" || goto failFast |
| 10 | +rem set msbuildPath="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe" |
| 11 | +set msbuildPath="msbuild" |
11 | 12 |
|
| 13 | +pushd |
| 14 | +cd /d %sourceFolder%SetVersion || goto failFast |
| 15 | +dotnet restore || goto failFast |
| 16 | +dotnet msbuild /p:Configuration=Release || goto failFast |
12 | 17 | popd |
13 | 18 |
|
14 | | -:noBuild |
| 19 | +pushd %sourceFolder%..\Samples\LinqPad\Queries || goto failFast |
| 20 | +call create_samples_package.cmd %dropFolder%samples.zip |
| 21 | +popd |
15 | 22 |
|
16 | | -copy ..\tools\NuGet.exe %bin%\ || goto failFast |
17 | | -copy ..\tools\zip.exe %bin%\ || goto failFast |
18 | | -copy ..\tools\PushPackages.cmd %bin%\ || goto failFast |
| 23 | +call :pack Tx.Core || goto failFast |
| 24 | +call :pack Tx.Windows || goto failFast |
| 25 | +call :pack Tx.Bond || goto failFast |
| 26 | +call :pack Tx.Network || goto failFast |
| 27 | +call :pack Tx.SqlServer || goto failFast |
19 | 28 |
|
20 | | -pushd ..\Samples\LinqPad\Queries || goto failFast |
21 | | -call create_samples_package.cmd |
| 29 | +pushd |
| 30 | +%sourceFolder%SetVersion\bin\Release\SetVersion.exe %versionParam% %sourceFolder%Tx.Windows.TypeGeneration\Tx.Windows.TypeGeneration.csproj || goto failFast |
| 31 | +cd /d %sourceFolder%Tx.Windows.TypeGeneration || goto failFast |
| 32 | +dotnet restore || goto failFast |
| 33 | +dotnet build -c=Release || goto failFast |
| 34 | +%sourceFolder%SetVersion\bin\Release\SetVersion.exe %versionParam% %sourceFolder%EtwEventTypeGen\EtwEventTypeGen.csproj || goto failFast |
| 35 | +%sourceFolder%SetVersion\bin\Release\SetVersion.exe %versionParam% %sourceFolder%EtwEventTypeGen\Properties\Tx.Windows.TypeGeneration.nuspec || goto failFast |
| 36 | +cd /d %sourceFolder%EtwEventTypeGen || goto failFast |
| 37 | +dotnet restore || goto failFast |
| 38 | +dotnet build -c=Release || goto failFast |
| 39 | +copy %sourceFolder%EtwEventTypeGen\Properties\Tx.Windows.TypeGeneration.nuspec %sourceFolder%EtwEventTypeGen\bin\Release\net45\ || goto failFast |
| 40 | +cd /d %sourceFolder%EtwEventTypeGen\bin\Release\net45 || goto failFast |
| 41 | +%sourceFolder%..\tools\NuGet pack Tx.Windows.TypeGeneration.nuspec || goto failFast |
| 42 | +move %sourceFolder%EtwEventTypeGen\bin\Release\net45\Tx.Windows.TypeGeneration.%versionParam%*.nupkg %dropFolder% || goto failFast |
22 | 43 | popd |
23 | 44 |
|
24 | 45 | pushd |
25 | | - |
26 | | -cd /d %bin%\Debug || goto failFast |
27 | | -call :setVersion || goto failFast |
28 | | -call :packAll || goto failFast |
29 | | - |
30 | | -cd /d %bin%\Release || goto failFast |
31 | | -call :setVersion || goto failFast |
32 | | -call :packAll || goto failFast |
33 | | - |
34 | | -cd /d %bin%\Release\Net45 || goto failFast |
35 | | -..\..\zip.exe ..\..\Tx.LinqPad.lpx header.xml System.Reactive.Interfaces.dll System.Reactive.Core.dll System.Reactive.Linq.dll System.Reactive.PlatformServices.dll System.Reactive.Windows.Forms.dll Tx.Core.dll Tx.Windows.dll Tx.Windows.TypeGeneration.dll Tx.SqlServer.dll msvcr100.dll xe.dll Microsoft.SqlServer.XE.Core.dll Microsoft.SqlServer.XEvent.Configuration.dll Microsoft.SqlServer.XEvent.dll Microsoft.SqlServer.XEvent.Linq.dll Microsoft.SqlServer.XEvent.Targets.dll Tx.LinqPad.dll HTTP_Server.man HTTP_Server.etl BasicPerfCounters.blg CrossMachineHTTP.etl CrossMachineIE.etl IE_Client.man sqltrace.xel Microsoft.Windows.ApplicationServer.Applications.man SampleWcfTrace.etl || goto failFast |
36 | | - |
| 46 | +%sourceFolder%SetVersion\bin\Release\SetVersion.exe %versionParam% %sourceFolder%Tx.Linqpad\Tx.Linqpad.csproj || goto failFast |
| 47 | +cd /d %sourceFolder%Tx.Linqpad || goto failFast |
| 48 | +dotnet restore || goto failFast |
| 49 | +%msbuildPath% /p:Configuration=Release || goto failFast |
| 50 | +cd /d %sourceFolder%Tx.Linqpad\bin\Release\net46 || goto failFast |
| 51 | +%sourceFolder%..\tools\zip.exe %dropFolder%Tx.LinqPad.lpx header.xml System.Reactive.Interfaces.dll System.Reactive.Core.dll System.Reactive.Linq.dll System.Reactive.PlatformServices.dll System.Reactive.Windows.Forms.dll Tx.Core.dll Tx.Windows.dll Tx.Windows.TypeGeneration.dll Tx.SqlServer.dll %sourceFolder%..\References\XEvent\msvcr100.dll %sourceFolder%..\References\XEvent\xe.dll Microsoft.SqlServer.XE.Core.dll Microsoft.SqlServer.XEvent.Configuration.dll Microsoft.SqlServer.XEvent.dll Microsoft.SqlServer.XEvent.Linq.dll Microsoft.SqlServer.XEvent.Targets.dll Tx.LinqPad.dll HTTP_Server.man HTTP_Server.etl BasicPerfCounters.blg CrossMachineHTTP.etl CrossMachineIE.etl IE_Client.man sqltrace.xel Microsoft.Windows.ApplicationServer.Applications.man SampleWcfTrace.etl || goto failFast |
37 | 52 | popd |
38 | | -goto end |
39 | 53 |
|
40 | | -:setVersion |
41 | | - |
42 | | -pushd Net45\Properties || goto failFast |
43 | | -..\SetVersion.exe || goto failFast |
| 54 | +pushd |
| 55 | +%sourceFolder%SetVersion\bin\Release\SetVersion.exe %versionParam% %sourceFolder%Tx.All\Tx.All.nuspec || goto failFast |
| 56 | +cd /d %sourceFolder%Tx.All || goto failFast |
| 57 | +%sourceFolder%..\tools\NuGet pack Tx.All.nuspec || goto failFast |
| 58 | +move %sourceFolder%Tx.All\Tx.All.*.nupkg %dropFolder%\ || goto failFast |
44 | 59 | popd |
45 | 60 |
|
46 | | -exit /b 0 |
| 61 | +cd %dropFolder% |
| 62 | +del /q Tx.%versionParam%.zip |
| 63 | +%sourceFolder%..\tools\zip.exe Tx.%versionParam%.zip samples.zip Tx.LinqPad.lpx || goto failFast |
47 | 64 |
|
48 | | -:packAll |
49 | | -call :pack Tx.Core || goto failFast |
50 | | -call :pack Tx.Windows || goto failFast |
51 | | -call :pack Tx.Bond || goto failFast |
52 | | -call :pack Tx.Network || goto failFast |
53 | | -call :pack Tx.Windows.TypeGeneration || goto failFast |
54 | | -call :pack Tx.SqlServer || goto failFast |
55 | | -call :pack Tx.All || goto failFast |
| 65 | +for /f "usebackq delims=|" %%f in (`dir /b "*.nupkg"`) do %sourceFolder%..\tools\zip.exe Tx.%versionParam%.zip %%f |
56 | 66 |
|
57 | | -exit /b 0 |
| 67 | +goto end |
58 | 68 |
|
59 | 69 | :pack %1 |
60 | | -call Net45\Properties\%1.Layout.cmd || goto failFast |
61 | | -cd /d %1 || goto failFast |
62 | | -copy ..\Net45\Properties\%1.nuspec || goto failFast |
63 | | -..\..\NuGet pack %1.nuspec || goto failFast |
64 | | -move *.nupkg ..\ || goto failFast |
65 | | -cd .. |
66 | | -rd /s/q %1 || goto failFast |
67 | | -exit /b 0 |
| 70 | + |
| 71 | +%sourceFolder%SetVersion\bin\Release\SetVersion.exe %versionParam% %sourceFolder%%1\%1.csproj || goto failFast |
| 72 | + |
| 73 | +pushd |
| 74 | +cd /d %sourceFolder%%1 || goto failFast |
| 75 | +dotnet restore || goto failFast |
| 76 | +dotnet build -c=Release || goto failFast |
| 77 | +move %sourceFolder%%1\bin\Release\%1.*.nupkg %dropFolder% || goto failFast |
| 78 | +popd |
68 | 79 |
|
69 | 80 | :end |
70 | 81 | cd %~dp0 |
|
0 commit comments