This repository has been archived by the owner on Feb 26, 2018. It is now read-only.
forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
automated.build
58 lines (48 loc) · 1.49 KB
/
automated.build
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
#version 1
set build-property Configuration Release
set execute-configuration Release
if host Windows
set target-platforms Windows
endif
if host MacOS
set target-platforms MacOS,iOS,Android
endif
if host Linux
set target-platforms Linux
endif
generate
if host Windows
nuget restore MonoGame.Framework\MonoGame.Framework.WindowsUniversal.project.json -NonInteractive
nuget restore MonoGame.Framework\MonoGame.Framework.Net.WindowsUniversal.project.json -NonInteractive
endif
set build-target Clean
build
set build-target Build
build
# Make sure we only push host packages from the host platform.
if host Windows
set target-platforms Windows
endif
if host MacOS
set target-platforms MacOS,iOS,Android
endif
if host Linux
set target-platforms Linux
endif
set package-format nuget/zip
pack . MonoGame.Redpoint.$TARGET_PLATFORM.nupkg $TARGET_PLATFORM
if host Windows
if file-exists C:\Users\build\Documents\nuget_api_key.txt
push C:\Users\build\Documents\nuget_api_key.txt MonoGame.Redpoint.$TARGET_PLATFORM.nupkg https://www.nuget.org/api/v2/package --ignore-on-existing
endif
endif
if host MacOS
if file-exists /Users/june/nuget_api_key.txt
push /Users/june/nuget_api_key.txt MonoGame.Redpoint.$TARGET_PLATFORM.nupkg https://www.nuget.org/api/v2/package --ignore-on-existing
endif
endif
if host Linux
if file-exists /srv/nuget_api_key.txt
push /srv/nuget_api_key.txt MonoGame.Redpoint.$TARGET_PLATFORM.nupkg https://www.nuget.org/api/v2/package --ignore-on-existing
endif
endif