This repository has been archived by the owner on Sep 17, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
appveyor.yml
67 lines (57 loc) · 2.35 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
environment:
nodejs_version: "10"
matrix:
- platform: x32
ARCH_SUFFIX: '-x86'
ARCH_ARG: '--ia32'
- platform: x64
ARCH_SUFFIX: '-x86_64'
ARCH_ARG: '--x64'
install:
- git submodule -q update --init
- ps: Install-Product node $env:nodejs_version
- yarn install
- ps: |
$replace_name = '"name": "$1' + "-win$env:ARCH_SUFFIX" + '"'
(Get-Content package.json) -replace '"name": "(.*)"', $replace_name | Set-Content package.json
(Get-Content .\app\package.json) -replace '"name": "(.*)"', $replace_name | Set-Content .\app\package.json
$bucket = "https://s3.amazonaws.com/webrecorder-builds/webrecorder-player"
$destination = "$env:APPVEYOR_BUILD_FOLDER\python-binaries\webrecorder_player.exe"
$current_branch = "$bucket/$env:APPVEYOR_REPO_BRANCH/webrecorder-player-win-$env:platform.exe"
$develop_branch = "$bucket/develop/webrecorder-player-win-$env:platform.exe"
$status = try { (invoke-webrequest -Uri $current_branch -Method Head).statuscode } catch {
$_.Exception.Response.StatusCode.Value__
}
if ($status -eq "200") {
Write-Host "downloading webrecorder artifact: $current_branch"
Invoke-WebRequest -Uri $current_branch -OutFile $destination
}
else {
Write-Host "downloading webrecorder artifact: $develop_branch"
Invoke-WebRequest -Uri $develop_branch -OutFile $destination
}
- ps: |
$flash_plugin = "https://s3.amazonaws.com/webrecorder-builds/flashplugin/pepflashplayer$env:ARCH_SUFFIX.dll"
Invoke-WebRequest -Uri $flash_plugin -OutFile "$env:APPVEYOR_BUILD_FOLDER\plugins\pepflashplayer.dll"
- ps: "& $destination '-v'"
build_script:
- ps: |
if ($env:APPVEYOR_REPO_BRANCH -eq "master" -or $env:APPVEYOR_REPO_BRANCH -eq "prerelease") {
npm run release -- $env:ARCH_ARG
}
else {
npm run dist -- $env:ARCH_ARG
}
- ps: "move dist/webrecorder-player*.* $env:APPVEYOR_BUILD_FOLDER/"
test: off
artifacts:
- path: "webrecorder-player*.*"
name: webrecorder-player
deploy:
provider: S3
region: $(aws_s3_region)
bucket: $(aws_s3_bucket)
access_key_id: $(aws_access_key_id)
secret_access_key: $(aws_secret_access_key)
folder: electron-player/$(APPVEYOR_REPO_BRANCH)
artifact: webrecorder-player