This repository has been archived by the owner on May 13, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
.appveyor.yml
88 lines (77 loc) · 2.58 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
version: "{build}"
image: Visual Studio 2015
branches:
only:
- /\d*\.\d*\.\d*/
configuration:
- release
skip_commits:
files:
- .gitattributes
- .gitignore
- .gitmodules
- .travis.yml
- .travis_install.bash
- .travis_script.bash
- Dockerfile
- LICENSE
- Makefile
- release.bash
- '**/*.md'
- '**/*.txt'
clone_folder: C:\projects\pony-stable
install:
- ps: |
$ErrorActionPreference = "Stop"
cd C:\projects\pony-stable
$package_commit = git rev-parse --short --verify "HEAD^{commit}"
$package_version = (Get-Content "VERSION")
$package_iteration = "$package_iteration${env:appveyor_build_number}.$package_commit"
if ($env:configuration -eq "debug")
{
$package_iteration = "$package_iteration-debug"
}
Update-AppveyorBuild -Version "pony-stable-$package_version-$package_iteration"
$req = [System.Net.WebRequest]::Create("https://bintray.com/pony-language/ponyc-win/ponyc/_latestVersion")
$req.AllowAutoRedirect = $false
$req.Proxy = $null
$req.Timeout = 500000
$req.UserAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox
$res = $req.GetResponse()
if ($res.StatusCode -eq "Found")
{
$latest_url = $res.GetResponseHeader("Location")
$latest_ver = $latest_url.Substring($latest_url.LastIndexOf("/") 1)
$latest_ver = $latest_ver.Substring(0, $latest_ver.LastIndexOf("-"))
$download_url = "https://bintray.com/pony-language/ponyc-win/download_file?file_path=" $latest_ver "-win64.zip"
Invoke-WebRequest -Uri $download_url -OutFile ponyc.zip
Expand-Archive "ponyc.zip" -DestinationPath "."
Rename-Item ($latest_ver "-win64") "ponyc"
}
else
{
Write-Error "Unable to determine latest Pony version from BinTray redirect!"
exit 1
}
build_script:
- cd C:\projects\pony-stable
- set PATH=C:\projects\pony-stable\ponyc\ponyc\bin;%PATH%
- make.bat config=%configuration%
- 7z a -tzip "C:\projects\pony-stable\%appveyor_build_version%-win64.zip" build\%configuration%
artifacts:
- path: 'pony-stable*.zip'
deploy:
# On branch `release`, deploy (and publish) artifacts
# to the ponyc-win projects on Bintray.
- provider: BinTray
username: pony-buildbot-2
api_key:
secure: 4KgdDQLp2kX816XH27d5xdJBPlKGhYXN6ttdHTSt5qe1MVIF /VResUstg0zuJ6m
subject: pony-language
repo: pony-stable-win
package: pony-stable
version: $(appveyor_build_version)
on:
branch: release
configuration: release
publish: true