This repository has been archived by the owner on Jun 7, 2019. It is now read-only.
forked from TheUnnamedOrganisation/RocketBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
272 lines (219 loc) · 11.5 KB
/
appveyor.yml
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: 0.0.0.{build}
branches:
only:
- master
# Do not build on tags
skip_tags: false
# Start builds on tags only
skip_non_tags: false
# Skipping commits affecting specific files
skip_commits:
files:
- '**\AssemblyInfo.*'
- 'CHANGELOG.md'
- 'README.md'
#
pull_requests:
do_not_increment_build_number: true
#---------------------------------#
# environment configuration #
#---------------------------------#
# Build worker image (VM template)
image: Visual Studio 2017
# scripts that are called at very beginning, before repo cloning
init:
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
$env:RocketBot2_Version = "$($env:APPVEYOR_REPO_TAG_NAME.Replace('v', ''))";
}
else
{
$env:RocketBot2_Version = "$($env:APPVEYOR_BUILD_VERSION)";
}
# clone directory
clone_folder: c:\projects\rocketbot2
# fetch repository as zip archive
shallow_clone: false
# set clone depth
# clone entire repository history if not defined
#clone_depth: 5
# environment variables
environment:
# matrix:
# - ruby_version: "21" # Older version, but matches Travis-CI
# - ruby_version: "21-x64"
CHANGELOG_GITHUB_TOKEN:
secure: yNRb78M1kncUfbzKLWl1igKg2piIARVYUpr0508PrTS7N/AwwnYozd+Ntr1gfUT+
auth_token:
secure: yNRb78M1kncUfbzKLWl1igKg2piIARVYUpr0508PrTS7N/AwwnYozd+Ntr1gfUT+
github_user:
secure: EHfj3CL5trOMzKP1sceM5A==
github_email:
secure: G641hL9+GJDfG5+L1lw0guzFoZlPVu1Zp+P39/l7/rU=
priv_key:
secure: 6EZ/isMS0OeU/OFTHH0qO9hXFWHStbiTkuHhspdGZb4gZ8gdDFIqWk7wWG77rVIvDQObjv75tDCpdq9bJH5DhJkF+jttHBxZS+rqcDdwMwXWqyrVatCyiB/shYa3N860H2myt+dr+t+WVRbUWEu3x5SGSD6YgRz5w2T47Dblfnx1O8/OgQFSYY8L1df/44XXU4u/DybIFYcfXbGkfNI2d5o8rCixvY+60r4djo31bmYYU9Nulz1NnjcmdqSrKP3kVkCjrKYpD+9vwImhTu+xxN2V9M+kFY+n5Zl/BDF3QyCduaux9d1Ow0wwntunZ8cyulHbF3NX63KvSFyG8ffuY8FIDas4nHOL1L+UaSpPjhRi3aLeO9pLhASQBcMEpokXokcm8un/pw2JE08jNtXv3QLlmJwO1Ep7bc7eSxBJ/1enCnzIcDnuPxcqYJf0GPNbOI5Z7QVqxSbP0h2JA4p1ggA+viIrOwZI5XGKFpHq45GE7tmV+rSFut4D3zdaDb3UIiHYk2hPyRPnZTcwcqxZXrIf3FN9qKXwJBSDKns/9oWVfmiQOQdV4Qs5AR6H9ojmRu2xkynfyJGEwlkQ6CRCK7wNoG7NJe6tsezqCsiHEdbRg2AET+smc20fcKBhE+dXSb5UTjLTx51to+iNyENx00h4vTyIDu+Vj3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UoAKDmWqK+KBWaE70T3SLw04iHknHdU7e8aqfHcu7r5AYqS8V5TRXrKMVTe+CiEmyIpJTAEEsVk6FCN0pYJNx/dK/eJBDptL3siIwn/dyv7J3Xsw5jU/ctxHjTHLqabep6/a5J7sEnJQwbuZGNChHFDCtvrYo8Is0ruqrdrzYhF5v6H2MMHKe7+qwSsObcSJttE+FI+1Gs9Bf5dkUp5vL/Hw5vnoLTicD8T03n0GoLUbuD6Ro/jPH4z0uMqKD5wS8JqfmEoqMrHKtepo7TyeUtM/igcoa4FTZHCtmZBFhX90jwcah38LCN7EYvJezf3I/ouBZoFKixScf1x+II+kdIfy+6UL3MFQJMPArAdhIY3LkPHJn8/qVlzbzLARxTsITpyXphTijDzCDtF55BRSoBJpMik0fShxUnb4Os6jLRB2U5JmFnFhn+HRkDgBudYfC5saP02k0Rk/g94USUSmMb99hu9ltePwvqs1Fkr13r5qXuwcKBImW+BTau4g2bUkaXv23g6eodQJxK5B8=
#cache:
# - packages -> **\packages.config # preserve packages directory in the root of build folder but will reset it if packages.config is modified
# - '%LocalAppData%\NuGet\Cache'
# scripts that run after cloning repository
install:
- git submodule update --init --recursive
#- rmdir PokeEase/platform /S /Q
#- Remove-Item item PokeEase\plugins -Recurse -Force
#- cd PokeEase && npm install && cd ..
# enable patching of AssemblyInfo.* files
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '$(RocketBot2_Version)'
assembly_file_version: "1.0.0.0"
assembly_informational_version: '$(APPVEYOR_REPO_TAG_NAME)'
#---------------------------------#
# build configuration #
#---------------------------------#
# build platform, i.e. x86, x64, Any CPU. This setting is optional.
#platform: x86
platform: Any CPU
# to add several platforms to build matrix:
#platform:
# - x86
# - Any CPU
# build Configuration, i.e. Debug, Release, etc.
configuration: Release
# to add several configurations to build matrix:
#configuration:
# - Debug
# - Release
build:
# MSBuild verbosity level
verbosity: quiet
# scripts to run before build
before_build:
- nuget restore
# - cd PokeEase && npm run pack && cd ..
# scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
before_package:
# scripts to run after build
after_build:
- ps: >-
Remove-Item "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)" -Recurse -ErrorAction Ignore;
New-Item -ItemType Directory -Force -Path "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)";
New-Item -ItemType Directory -Force -Path "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)";
if ($env:PLATFORM -eq "x86")
{
Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\RocketBot2\bin\$($env:PLATFORM)\$($env:CONFIGURATION)" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\RocketBot2" -Force;
}
elseif ($env:PLATFORM -eq "x64")
{
Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\RocketBot2\bin\$($env:PLATFORM)\$($env:CONFIGURATION)" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\RocketBot2" -Force;
}
elseif ($env:PLATFORM -eq "Any CPU")
{
Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\RocketBot2\bin\$($env:CONFIGURATION)" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\RocketBot2" -Force;
}
# Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\PokeEase\build\android-debug.apk" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\android-debug.apk" -Force;
# Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\PokeEase\build\android-debug-unaligned.apk" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\android-debug-unaligned.apk" -Force;
# Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\PokeEase\build\android-release-unsigned.apk" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\android-release-unsigned.apk" -Force;
# Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\PokeEase\dist\win-ia32-unpacked" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\PokeEase" -Force;
# New-Item -ItemType Directory -Force -Path "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\RocketBot2\Android";
# New-Item -ItemType Directory -Force -Path "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\RocketBot2\PokeEase";
# Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\PokeEase\build\android-debug.apk" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\RocketBot2\Android\android-debug.apk" -Force;
# Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\PokeEase\build\android-debug-unaligned.apk" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\RocketBot2\Android\android-debug-unaligned.apk" -Force;
# Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\PokeEase\build\android-release-unsigned.apk" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\RocketBot2\Android\android-release-unsigned.apk" -Force;
# Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\PokeEase\dist\win-ia32-unpacked\*" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\RocketBot2\PokeEase" -Force;
# to run your custom scripts instead of automatic MSBuild
build_script:
#---------------------------------#
# tests configuration #
#---------------------------------#
# to disable automatic tests
test: off
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
- path: '\$(PLATFORM)\$(CONFIGURATION)\RocketBot2'
name: RocketBot2
# - path: '\$(PLATFORM)\$(CONFIGURATION)\android-debug.apk'
# name: android-debug
# - path: '\$(PLATFORM)\$(CONFIGURATION)\android-debug-unaligned.apk'
# name: android-debug-unaligned
# - path: '\$(PLATFORM)\$(CONFIGURATION)\android-release-unsigned.apk'
# name: android-release-unsigned
# - path: '\$(PLATFORM)\$(CONFIGURATION)\PokeEase'
# name: PokeEase
#---------------------------------#
# deployment configuration #
#---------------------------------#
# providers: Local, FTP, WebDeploy, AzureCS, AzureBlob, S3, NuGet, Environment
# provider names are case-sensitive!
deploy:
# Deploy to GitHub Releases
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
description: '[CHANGELOG.md](https://github.com/TheUnnamedOrganisation/RocketBot/blob/master/CHANGELOG.md)'
release: RocketBot2 $(APPVEYOR_REPO_TAG_NAME)
auth_token: $(auth_token)
artifact: RocketBot2 #;android-debug;android-debug-unaligned;android-release-unsigned;PokeEase
draft: false
prerelease: false
force_update: true
on:
appveyor_repo_tag: true
# scripts to run before deployment
before_deploy:
- ps: >-
$fileContent = "-----BEGIN RSA PRIVATE KEY-----`n";
$fileContent += $env:priv_key.Replace(' ', "`n");
$fileContent += "`n-----END RSA PRIVATE KEY-----`n";
Set-Content "$env:USERPROFILE\.ssh\id_rsa" "$($fileContent)";
Set-Content "$env:USERPROFILE\.git-credentials" "https://$($env:auth_token):x-oauth-basic@github.com`n";
- git config --global credential.helper store
- git config --global user.email "%github_email%"
- git config --global user.name "%github_user%"
- git checkout master
- git checkout -b Appveyor "%APPVEYOR_REPO_BRANCH%"
- SET PATH=C:\Ruby23-x64\bin;%PATH%
# Print version and location for pre-installed ruby
- ruby --version
- where ruby
# Install latest version of RubyGems
- gem update --system --no-document --no-post-install-message
- gem --version
- where gem
# Print version and location for pre-installed bundler
#- bundler --version
#- where bundler
# Install ruby dependencies
- gem install bundler -f
- bundle install
#- bundle install --retry 3
- bundle exec github_changelog_generator --max-issues 75
- git add "CHANGELOG.md"
- git add "RocketBot2/Properties/AssemblyInfo.cs"
- git commit -m "%APPVEYOR_REPO_TAG_NAME%"
- git checkout "%APPVEYOR_REPO_BRANCH%"
- git merge Appveyor
- git branch -d Appveyor
- git pull "origin" "%APPVEYOR_REPO_BRANCH%"
- git push "origin" "%APPVEYOR_REPO_BRANCH%"
# scripts to run after deployment
after_deploy:
# to run your custom scripts instead of provider deployments
deploy_script:
# to disable deployment
#deploy: off
#---------------------------------#
# global handlers #
#---------------------------------#
# on successful build
on_success:
# on build failure
on_failure:
# after build failure or success
on_finish: