-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathappveyor.yml
66 lines (57 loc) · 2.09 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
image: Visual Studio 2017
version: '{build}'
max_jobs: 4
clone_depth: 5
pull_requests:
do_not_increment_build_number: true
skip_tags: true
only_commits:
files:
- SickChill.iss
- idp/**
- assets/**
- appveyor.yml
install:
- ps: choco install -y --no-progress InnoSetup
before_build:
- ps: |-
$InstallerVersion = Select-String -Path .\SickChill.iss `
-Pattern '^#define\sInstallerVersion\s([\d]+)' | `
% { $($_.matches.groups[1]).Value };
$SeedVersion = Select-String -Path .\seed.ini `
-Pattern '^Version=([\d]+)' | `
% { $($_.matches.groups[1]).Value };
If ($InstallerVersion -ne $SeedVersion `
-and $APPVEYOR_REPO_BRANCH -ne "master" `
-and -not $APPVEYOR_PULL_REQUEST_NUMBER) { `
"`nSeed version differs from version in source code!" + `
"`n Version in source code: $InstallerVersion" + `
"`n Version in seed file: $SeedVersion" + `
"`nMake sure to update the value before pushing to master." `
| Write-Warning }
build_script:
- cmd: iscc.exe /Q SickChill.iss
test: off
artifacts:
- path: Output\SickChillInstaller.exe
name: SickChillInstaller.exe
before_deploy:
- ps: |-
$env:ReleaseVersion = Select-String -Path .\SickChill.iss `
-Pattern '^#define\sSickChillInstallerVersion\s"(v[\d.]+)"' | `
% { $($_.matches.groups[1]).Value };
If ($InstallerVersion -ne $SeedVersion) { `
throw "Seed version differs from version in source code!`n" + `
"`tVersion in source code: $InstallerVersion`n" + `
"`tVersion in seed file: $SeedVersion" + `
"You have to update the value before releasing" }
deploy:
- provider: GitHub
tag: $(ReleaseVersion)
force_update: true # replaces current release
draft: true # release as a draft
auth_token:
secure: gsxaw2HAH3MKoCppwwPy6LBmfbcDMbbTyTRZza+tc1Hda+Qr7MhswHhp6wqJoZQj
artifact: SickChillInstaller.exe
on:
branch: master # release from master branch only