forked from t081as/ScreenSaver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.cmd
106 lines (90 loc) · 3.49 KB
/
Build.cmd
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
@echo off
echo ScreenSaver - build task
echo.
echo Restoring nuget packages
nuget restore ScreenSaver.sln
if errorlevel 1 goto error
echo Setting version number
Build\Packages\Veronique.1.2.0\tools\Veronique
if errorlevel 1 goto error
echo Building solution v4.5 (release)
msbuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo ^
/property:Configuration=Release /property:Platform="Any CPU" ^
/verbosity:quiet ^
/p:TargetFrameworkVersion=v4.5 /p:OutputPath="..\..\Build\Release\net45" ^
ScreenSaver.sln
if errorlevel 1 goto error
echo Building solution v4.5.1 (release)
msbuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo ^
/property:Configuration=Release /property:Platform="Any CPU" ^
/verbosity:quiet ^
/p:TargetFrameworkVersion=v4.5.1 /p:OutputPath="..\..\Build\Release\net451" ^
ScreenSaver.sln
if errorlevel 1 goto error
echo Building solution v4.5.2 (release)
msbuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo ^
/property:Configuration=Release /property:Platform="Any CPU" ^
/verbosity:quiet ^
/p:TargetFrameworkVersion=v4.5.2 /p:OutputPath="..\..\Build\Release\net452" ^
ScreenSaver.sln
if errorlevel 1 goto error
echo Building solution v4.6 (release)
msbuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo ^
/property:Configuration=Release /property:Platform="Any CPU" ^
/verbosity:quiet ^
/p:TargetFrameworkVersion=v4.6 /p:OutputPath="..\..\Build\Release\net46" ^
ScreenSaver.sln
if errorlevel 1 goto error
echo Building solution v4.6.1 (release)
msbuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo ^
/property:Configuration=Release /property:Platform="Any CPU" ^
/verbosity:quiet ^
/p:TargetFrameworkVersion=v4.6.1 /p:OutputPath="..\..\Build\Release\net461" ^
ScreenSaver.sln
if errorlevel 1 goto error
echo Building solution v4.6.2 (release)
msbuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo ^
/property:Configuration=Release /property:Platform="Any CPU" ^
/verbosity:quiet ^
/p:TargetFrameworkVersion=v4.6.2 /p:OutputPath="..\..\Build\Release\net462" ^
ScreenSaver.sln
if errorlevel 1 goto error
echo Building solution v4.7 (release)
msbuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo ^
/property:Configuration=Release /property:Platform="Any CPU" ^
/verbosity:quiet ^
/p:TargetFrameworkVersion=v4.7 /p:OutputPath="..\..\Build\Release\net47" ^
ScreenSaver.sln
if errorlevel 1 goto error
echo Building solution v4.7.1 (release)
msbuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo ^
/property:Configuration=Release /property:Platform="Any CPU" ^
/verbosity:quiet ^
/p:TargetFrameworkVersion=v4.7.1 /p:OutputPath="..\..\Build\Release\net471" ^
ScreenSaver.sln
if errorlevel 1 goto error
echo Building solution v4.7.2 (release)
msbuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo ^
/property:Configuration=Release /property:Platform="Any CPU" ^
/verbosity:quiet ^
/p:TargetFrameworkVersion=v4.7.2 /p:OutputPath="..\..\Build\Release\net472" ^
ScreenSaver.sln
if errorlevel 1 goto error
echo Builing package
nuget pack ScreenSaver.nuspec
if errorlevel 1 goto error
echo Cleaning up
git checkout -- ScreenSaver.nuspec
if errorlevel 1 goto error
git checkout -- ScreenSaver/ScreenSaver/Properties/AssemblyInfo.cs
if errorlevel 1 goto error
git checkout -- ScreenSaver/ScreenSaver.Test/Properties/AssemblyInfo.cs
if errorlevel 1 goto error
:success
echo.
echo Build successful
exit /b 0
:error
echo.
echo Build failed
exit /b 1