-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
103 lines (81 loc) · 2.49 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
version: '{build}'
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
skip_tags: true
skip_branch_with_pr: true
max_jobs: 1
configuration: Release
init:
- cmd: >-
tzutil /s "Russian Standard Time"
git config --global core.autocrlf input
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
install:
- ps: >-
$AssemblyFile = "vs\Properties\AssemblyInfo.cs"
$RegularExpression = [regex] '^\[assembly: AssemblyFileVersion\(\"(\d*\.\d*\.\d*)\.\d*\"\)\]$'
$FileContent = Get-Content $AssemblyFile
foreach($content in $FileContent) {
$match = [System.Text.RegularExpressions.Regex]::Match($content, $RegularExpression)
if($match.Success) {
$ver = $match.groups[1].value
break;
}
}
Update-AppveyorBuild -Version ("{0}.{1}" -f $ver, $env:APPVEYOR_BUILD_NUMBER)
$CommitDateTime = [datetime]::Parse($env:APPVEYOR_REPO_COMMIT_TIMESTAMP)
$env:BuildDate = $CommitDateTime.ToString('yyyy-MM-dd')
$env:Site = "http://{0}.github.io/{1}" -f $env:APPVEYOR_ACCOUNT_NAME, $env:APPVEYOR_PROJECT_NAME
Write-Host "Building v$env:APPVEYOR_BUILD_VERSION dated $env:BuildDate"
build:
verbosity: minimal
before_package:
- cmd: >-
copy vs\bin\%CONFIGURATION%\Verba.exe* test
rd /s /q vs\bin
rd /s /q vs\obj
echo pub\* >>Package
echo samples\* >>Package
echo test\* >>Package
echo verba\* >>Package
echo vs\* >>Package
echo work\* >>Package
echo %APPVEYOR_PROJECT_NAME% v%APPVEYOR_BUILD_VERSION% (%BUILDDATE%) >readme.txt
echo %SITE% >>readme.txt
echo [InternetShortcut] >readme.url
echo URL=%SITE% >>readme.url
after_build:
- cmd: 7z a %APPVEYOR_PROJECT_NAME%-v%APPVEYOR_BUILD_VERSION%.zip @Package readme.txt readme.url
artifacts:
- path: $(appveyor_project_name)-v$(appveyor_build_version).zip
name: AppZip
deploy:
- provider: GitHub
tag: v$(appveyor_build_version)
release: $(appveyor_project_name) v$(appveyor_build_version)
description: 'Build #$(appveyor_build_number) by AppVeyor $(BuildDate): $(appveyor_repo_commit_message)\nSee docs on $(Site)'
auth_token:
secure: CePfctnBFd3iDwgVWlGOD6mfxQZrNBHK7IpsCK/deo2vHxA3lTr2nRnhbqpKqchQ
artifact: AppZip
draft: false
prerelease: true
force_update: true
on:
branch: master
only_commits:
files:
- pub\
- samples\
- test\
- verba\
- vs\
- work\
- appveyor.yml