forked from rscustom/rocksmith-custom-song-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
80 lines (69 loc) · 3.27 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
# script syntax is very sensitive - BE CAREFUL EDITING
version: "{build}"
branches:
only:
- master
configuration: Release
test: off
environment:
cert_url:
secure: +Hrnyb/2BCwM+8B+26euLJlIcgul2423FxzS82lgeI5UsoGAQG8jQ2NggFRFjVCl
cert_pass:
secure: qMlxBF8JbVTwM9vm3fYbCdbuI+0cD2ixtu61YzVoq2c=
build:
parallel: true
verbosity: minimal
project: RocksmithCustomSongCreator.sln
install:
- set PATH=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin;%PATH%
# scripts to run before build
before_build:
- rem any PAUSE commands in a batch file will make AppVeyor hang ...
- ps: $env:GIT_HASH = $env:APPVEYOR_REPO_COMMIT.Substring(0, 8)
- ps: .\PatchAssemblyVersion.ps1 "$env:APPVEYOR_BUILD_FOLDER\RocksmithTookitGUI\Properties\AssemblyInfo.cs"
- ps: .\PatchAssemblyVersion.ps1 "$env:APPVEYOR_BUILD_FOLDER\RocksmithToolkitLib\Properties\AssemblyInfo.cs"
- ps: .\PatchAssemblyVersion.ps1 "$env:APPVEYOR_BUILD_FOLDER\RocksmithToolkitUpdater\Properties\AssemblyInfo.cs"
#
# enable patching of AssemblyInfo.* files
# assembly_info: breaks the $env:BuildVer variable
#
#assembly_info:
# patch: false
# file: AssemblyInfo.cs
# assembly_informational_version: '$(GIT_HASH)'
# scripts to run after build
after_build:
- set BIN=%APPVEYOR_BUILD_FOLDER%\RocksmithTookitGUI\bin
- rem Code signing
- ps: if ($env:cert_url) { Start-FileDownload $env:cert_url }
- if defined cert_url signtool sign /v /f selfsigned2017.pfx /p "%cert_pass%" /t http://timestamp.verisign.com/scripts/timstamp.dll "%BIN%\Release\RocksmithToolkitGUI.exe" "%BIN%\Release\RocksmithToolkitUpdater.exe" "%BIN%\Release\RocksmithToolkitLib.dll"
- rem General package variables
- ps: $env:BuildVer = Select-String -Path $env:APPVEYOR_BUILD_FOLDER"\RocksmithToolkitLib\Properties\AssemblyInfo.cs" -Pattern '^\[assembly:\ AssemblyVersion\("(.*?)"\)\]' | % { $_.Matches } | % { $_.Groups[1].Value }
- ps: $env:BuildCommit = $env:APPVEYOR_REPO_COMMIT.Substring(0, 8)
- ps: $env:PkgName = "rstoolkit-" + $env:BuildVer + "-" + $env:BuildCommit
- rem Windows package
- 7z a %PkgName%-win.zip %BIN%\Release\*
- rem Mac package
- del "%BIN%\RocksmithCustomSongToolkit.app\Contents\Resources\gitkeep.txt"
- xcopy /E "%BIN%\Release\*" "%BIN%\RocksmithCustomSongToolkit.app\Contents\Resources\"
- xcopy "%APPVEYOR_BUILD_FOLDER%\RocksmithTookitGUI\songcreator.icns" "%BIN%\RocksmithCustomSongToolkit.app\Contents\Resources\"
- copy "%BIN%\Release\RocksmithToolkitGUI.exe" "%BIN%\RocksmithCustomSongToolkit.app\Contents\Resources\RocksmithCustomSongToolkit.exe"
- del "%BIN%\RocksmithCustomSongToolkit.app\Contents\Resources\RocksmithToolkitGUI.exe"
- 7z a %PkgName%-mac.zip "%BIN%\RocksmithCustomSongToolkit.app\"
- rem Sign artifacts to avoid lockups
- rem can't really sign any zip file tho
artifacts:
- path: '*-win.zip'
name: Windows
- path: '*-mac.zip'
name: Mac
# let us know about build state
notifications:
- provider: Webhook
url: "http://hook.rscustom.net/appveyor"
headers:
Authorization:
secure: NjVdRVVdkTGELbhe2ejYz/soldL9HWrzpaVcDpPM5tX0lYfFd0ld8Q2NowOfBiqxEKa1t7jgV6z8XO6B5g4nMM9rkqJwjzmrN8ZQbfIX7+Z2xokQo6A1ET4uadCfKrIOHPYBQyGaaimojJKJlq+Zzw+BsQD/OLDKf3u9q6MARyg=
on_build_success: true
on_build_failure: true
on_build_status_changed: true