-
Notifications
You must be signed in to change notification settings - Fork 72
/
appveyor.yml
64 lines (56 loc) · 2.04 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
branches:
only:
- master
configuration:
- Debug
- Release
image: Visual Studio 2017
skip_commits:
files:
- README.md
skip_branch_with_pr: true
# Taken from https://boblokerse.github.io/2015/11/03/GitVersion-versioning-made-easy-and-dry/
install:
- ver
- ps: choco install -y -r --no-progress InnoSetup
- ps: |
function gitVersion() {
$env:newhash=git rev-parse HEAD
$env:shorthash=git rev-parse --short HEAD
If ($env:appveyor_repo_tag -eq $TRUE) {
$env:newVersion=$env:appveyor_repo_tag_name
$env:appveyor_info_version=$env:appveyor_repo_tag_name
} Else {
$gitVersion=git describe --tags --abbrev=0 $env:APPVEYOR_REPO_BRANCH
$env:newVersion="$gitVersion.$env:APPVEYOR_BUILD_NUMBER"
$env:appveyor_info_version="$env:newVersion"
}
$env:appveyor_build_version="$env:newVersion"
appveyor UpdateBuild -Version "$env:newVersion"
write-host "Using hash for build version: $env:newhash"
write-host "Update appveyor build version to: $env:appveyor_build_version"
write-host "Update appveyor info version to: $env:appveyor_info_version"
}
gitVersion
# patch the assembly version, but only in our own directories
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: $(appveyor_build_version)
assembly_file_version: $(appveyor_build_version)
assembly_informational_version: $(appveyor_info_version)
# Automatically register private account and/or project AppVeyor NuGet feeds.
#nuget:
# account_feed: true
# project_feed: true
# disable_publish_on_pr: true
before_build:
- nuget restore ScriptPlayer\ScriptPlayer.sln
build:
parallel: true
project: ScriptPlayer\ScriptPlayer.sln
publish_nuget: false
after_build:
- ps: set PATH=%PATH%;"C:\\Program Files (x86)\\Inno Setup 5"
- ps: iscc scriptplayer-installer.iss
- ps: Push-AppveyorArtifact installer\scriptplayer-installer.exe -FileName ScriptPlayer-$env:CONFIGURATION-$env:APPVEYOR_BUILD_VERSION.exe