-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathappveyor.yml
61 lines (48 loc) · 1.71 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
version: '{build}'
pull_requests:
do_not_increment_build_number: true
skip_tags: true
skip_branch_with_pr: true
init:
- cmd: >-
tzutil /s "Russian Standard Time"
git config --global core.autocrlf input
install:
- ps: >-
$HTAFile = 'UFEBS_Viewer.hta'
$RegularExpression = [regex] 'version=\"(\d*\.\d*\.\d*)\"$'
$FileContent = Get-Content $HTAFile
foreach($content in $FileContent) {
$match = [System.Text.RegularExpressions.Regex]::Match($content, $RegularExpression)
if($match.Success) {
$env:VERSION = $match.groups[1].value
break;
}
}
Update-AppveyorBuild -Version ("{0} build {1}" -f $env:VERSION, $env:APPVEYOR_BUILD_NUMBER)
$CommitDateTime = [datetime]::Parse($env:APPVEYOR_REPO_COMMIT_TIMESTAMP)
$env:BuildDate = $CommitDateTime.ToString('dd.MM.yyyy')
Write-Host "Building v$env:APPVEYOR_BUILD_VERSION dated $env:BuildDate"
build_script:
- cmd: >-
echo UFEBS_Viewer.* >>Package
echo *.xslt >>Package
echo %APPVEYOR_PROJECT_NAME% v%APPVEYOR_BUILD_VERSION% (%BUILDDATE%) >readme.txt
echo http://%APPVEYOR_ACCOUNT_NAME%.github.io/%APPVEYOR_PROJECT_NAME% >>readme.txt
7z a UFEBS-Viewer-v%VERSION%.zip @Package readme.txt
artifacts:
- path: UFEBS-Viewer-v$(version).zip
name: AppZip
deploy:
- provider: GitHub
tag: v$(version)
release: UFEBS Viewer v$(version)
description: '* $(appveyor_repo_commit_message)\n\nBuild #$(appveyor_build_number) by AppVeyor $(BuildDate)\nSee docs on http://$(appveyor_account_name).github.io/$(appveyor_project_name)'
auth_token:
secure: CePfctnBFd3iDwgVWlGOD6mfxQZrNBHK7IpsCK/deo2vHxA3lTr2nRnhbqpKqchQ
artifact: AppZip
force_update: true
skip_commits:
files:
- docs\*
- '**\*.md'