-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
60 lines (51 loc) · 2.06 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
# https://www.appveyor.com/docs/appveyor-yml
# https://www.appveyor.com/docs/lang/nodejs-iojs
branches:
only:
- master
skip_non_tags: true
environment:
matrix:
# node.js
- nodejs_version: "8"
- nodejs_version: "9"
- nodejs_version: "10"
- nodejs_version: "11"
- nodejs_version: "12"
COVERALLS_GIT_BRANCH: master
COVERALLS_REPO_TOKEN:
secure: O6TFMlnlQ5EeCXjG2idqTJLtG0HPDGsZg5Y9vJIBp0J6Dmzf6FD6e9fZt2bA1Yz
COVERALLS_SERVICE_NAME: appveyor
VERSION_SIMPLE: '{version}'
VERSION_INFORMATIONAL: '{version}'
init:
- ps: |
$env:VERSION_SIMPLE = $env:APPVEYOR_BUILD_VERSION.TrimStart("v")
$env:VERSION_INFORMATIONAL = "$env:VERSION_SIMPLE"
$env:GITHUB_REPO_API = "https://api.github.com/repos/$env:APPVEYOR_REPO_NAME/tags"
$env:APPVEYOR_REPO_TAG_NAME = $env:APPVEYOR_REPO_TAG_NAME.TrimStart("v")
Write-Host "Building a tagged Git commit: $git_current_tag";
if ($env:APPVEYOR_REPO_TAG_NAME -match '^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$') {
$tag_suffix = $env:APPVEYOR_REPO_TAG_NAME -replace "^([0-9]+)\.([0-9]+)\.([0-9]+)", ''
$tag_num = $env:APPVEYOR_REPO_TAG_NAME -replace "(?<=^([0-9]+)\.([0-9]+)\.([0-9]+)).*", ''
$tag_ver = [version]$tag_num
$tag_simple = "{0}.{1}.{2}" -f $tag_ver.Major, $tag_ver.Minor, $tag_ver.Build
$env:VERSION_INFORMATIONAL = "{0}.{1}.{2}{3}" -f $tag_ver.Major, $tag_ver.Minor, $tag_ver.Build, $tag_suffix
$env:VERSION_SIMPLE = "$tag_simple.$env:APPVEYOR_BUILD_NUMBER"
}
### MAKE CALCULATED INFORMATIONAL VERSION THE ACTUAL BUILD VERSION
Update-AppveyorBuild -Version $env:VERSION_INFORMATIONAL
Write-Host "Using build version: $env:VERSION_SIMPLE"
Write-Host "Using (informational) build version: $env:VERSION_INFORMATIONAL"
install:
- ps: Install-Product node $env:nodejs_version
- npm install -g gulp nyc
- npm install
test_script:
- node --version
- npm --version
- gulp --version
- cmd: npx nyc gulp test
after_test:
cmd: npx nyc report --reporter=text-lcov
build: off