-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
65 lines (50 loc) · 1.84 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
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: >-
$AppFile = 'TshTrans\TshTrans.ps1'
$RegularExpression = [regex] "Version\s*=\s*'(\d*\.\d*\.\d*)'"
$FileContent = Get-Content $AppFile
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('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_script:
- cmd: >-
echo TshTrans\*.* >>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
7z a Tsh-Transport-v%VERSION%.zip @Package readme.txt readme.url
artifacts:
- path: Tsh-Transport-v$(version).zip
name: AppZip
deploy:
- provider: GitHub
tag: v$(version)
release: TSH Transport v$(version)
description: 'Build #$(appveyor_build_number) by AppVeyor $(BuildDate): $(appveyor_repo_commit_message) ([Changelog](https://github.com/$(appveyor_repo_name)/blob/master/CHANGELOG.md))\nSee docs on $(Site).'
auth_token:
secure: CePfctnBFd3iDwgVWlGOD6mfxQZrNBHK7IpsCK/deo2vHxA3lTr2nRnhbqpKqchQ
artifact: AppZip
force_update: true
skip_commits:
files:
- docs\*
- '**\*.md'