forked from xamarin/Xamarin.Forms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.create-nuget.bat
89 lines (86 loc) · 3.78 KB
/
.create-nuget.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
77
78
79
80
81
82
83
84
85
86
87
88
89
rem This is not our official nuget build script.
rem This is used as a quick and dirty way create nuget packages used to test user issue reproductions.
rem This is updated as XF developers use it to test reproductions. As such, it may not always work.
rem This is not ideal, but it's better than nothing, and it usually works fine.
@echo off
rem stub uncommon targets
set NUGET_EXE=%NUGET_DIR%NuGet.exe
if "%1" == "droid" (
set CONFIG=debug
call .create-stubs.bat
%NUGET_EXE% restore .xamarin.forms.android.nuget.sln
msbuild /v:m /p:platform="any cpu" /p:WarningLevel=0 .xamarin.forms.android.nuget.sln /t:Restore
msbuild /v:m /p:platform="any cpu" /p:WarningLevel=0 .xamarin.forms.android.nuget.sln
)
if "%1" == "rdroid" (
set CONFIG=release
call .create-stubs.bat
%NUGET_EXE% restore .xamarin.forms.android.nuget.sln
msbuild /v:m /p:configuration=release /p:platform="any cpu" /p:WarningLevel=0 .xamarin.forms.android.nuget.sln /t:Restore
msbuild /v:m /p:configuration=release /p:platform="any cpu" /p:WarningLevel=0 .xamarin.forms.android.nuget.sln
)
if "%1" == "adroid" (
call .create-nuget.bat droid
call .create-nuget.bat rdroid
EXIT /b
)
if "%1" == "pdroid" (
set CONFIG=release
msbuild /v:m /p:configuration=release /p:platform="anyCpu" /p:WarningLevel=0 Xamarin.Forms.Platform.Android\Xamarin.Forms.Platform.Android.csproj /t:Restore
msbuild /v:m /p:configuration=release /p:platform="anyCpu" /p:WarningLevel=0 Xamarin.Forms.Platform.Android\Xamarin.Forms.Platform.Android.csproj
)
if "%1" == "pddroid" (
set CONFIG=debug
msbuild /v:m /p:configuration=debug /p:platform="anyCpu" /p:WarningLevel=0 Xamarin.Forms.Platform.Android\Xamarin.Forms.Platform.Android.csproj /t:Restore
msbuild /v:m /p:configuration=debug /p:platform="anyCpu" /p:WarningLevel=0 Xamarin.Forms.Platform.Android\Xamarin.Forms.Platform.Android.csproj
)
if "%1" == "ios" (
set CONFIG=debug
call .create-stubs.bat
%NUGET_EXE% restore .xamarin.forms.ios.nuget.sln
msbuild /v:m /p:platform="any cpu" .xamarin.forms.ios.nuget.sln
)
if "%1" == "droidios" (
set CONFIG=debug
call .create-stubs.bat
%NUGET_EXE% restore .xamarin.forms.android.nuget.sln
%NUGET_EXE% restore .xamarin.forms.ios.nuget.sln
msbuild /v:m /p:platform="any cpu" /p:WarningLevel=0 .xamarin.forms.android.nuget.sln
msbuild /v:m /p:platform="any cpu" .xamarin.forms.ios.nuget.sln
)
if "%1" == "uap" (
set CONFIG=debug
call .create-stubs.bat
%NUGET_EXE% restore .xamarin.forms.uap.nuget.sln
msbuild /v:m /p:platform="any cpu" .xamarin.forms.uap.nuget.sln /t:restore
msbuild /v:m /p:platform="any cpu" .xamarin.forms.uap.nuget.sln
)
if [%1] == [] (
rem Create all nugets
goto all
)
if "%1" == "all" (
:all
set CONFIG=debug
call .create-stubs.bat
%NUGET_EXE% restore .xamarin.forms.nuget.sln
msbuild /v:m /p:platform="any cpu" .xamarin.forms.uap.nuget.sln /t:restore
msbuild /v:m /p:platform="any cpu" /p:WarningLevel=0 .xamarin.forms.nuget.sln
)
if "%1" == "rall" (
set CONFIG=release
call .create-stubs.bat
%NUGET_EXE% restore .xamarin.forms.nuget.sln
msbuild /v:m /p:platform="any cpu" .xamarin.forms.uap.nuget.sln /t:restore /p:configuration=release
msbuild /v:m /p:platform="any cpu" /p:WarningLevel=0 .xamarin.forms.nuget.sln /p:configuration=release /t:Restore
msbuild /v:m /p:platform="any cpu" /p:WarningLevel=0 .xamarin.forms.nuget.sln /p:configuration=release
)
if "%DEBUG_VERSION%"=="" set DEBUG_VERSION=0
set /a DEBUG_VERSION=%DEBUG_VERSION%+1
pushd .nuspec
%NUGET_EXE% pack Xamarin.Forms.nuspec -properties configuration=%CONFIG%;platform=anycpu -Version 9.9.%DEBUG_VERSION%
if "%CREATE_MAP_NUGET%" NEQ "" (
REM Requires building x86, x64, AMD
%NUGET_EXE% pack Xamarin.Forms.Maps.nuspec -properties configuration=%CONFIG%;platform=anycpu -Version 9.9.%DEBUG_VERSION%
)
popd