forked from xltrail/git-xl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
78 lines (66 loc) · 3.13 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
skip_branch_with_pr: true
environment:
NETLIFY_BUILD_HOOK:
secure: B+WxLXotvuRzEvMtuTWijhs3s+jvnGifsmNIMEf7ll0=
version: '{build}'
init:
# Set "build version number" to "short-commit-hash" or when tagged to "tag name" (Travis style)
- cmd: SET PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x64\;%PATH%
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
Update-AppveyorBuild -Version "$env:APPVEYOR_REPO_TAG_NAME"
}
else
{
Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_COMMIT.substring(0,7))"
}
install:
- cinst InnoSetup -y
- nuget install secure-file -ExcludeVersion
- secure-file\tools\secure-file -decrypt scripts\windows\key.p12.enc -secret %secure%
- C:\Python36\Scripts\pip install -r requirements.txt
- C:\Python36-x64\Scripts\pip install -r requirements.txt
build_script:
- C:\Python36\python .\scripts\windows\update-version-info.py
- C:\Python36\Scripts\pyinstaller --onefile .\src\diff.py --name git-xl-diff-x86.exe --version-file .\scripts\windows\git-xl-version-info.py --icon .\scripts\windows\git-xl-logo.ico
- mv dist\git-xl-diff-x86.exe git-xl-diff-x86.exe
- C:\Python36-x64\Scripts\pyinstaller --onefile .\src\diff.py --name git-xl-diff-x64.exe --version-file .\scripts\windows\git-xl-version-info.py --icon .\scripts\windows\git-xl-logo.ico
- mv dist\git-xl-diff-x64.exe git-xl-diff-x64.exe
- C:\Python36\Scripts\pyinstaller --onefile .\src\cli.py --name git-xl-x86.exe --version-file .\scripts\windows\git-xl-version-info.py --icon .\scripts\windows\git-xl-logo.ico
- mv dist\git-xl-x86.exe git-xl-x86.exe
- C:\Python36-x64\Scripts\pyinstaller --onefile .\src\cli.py --name git-xl-x64.exe --version-file .\scripts\windows\git-xl-version-info.py --icon .\scripts\windows\git-xl-logo.ico
- mv dist\git-xl-x64.exe git-xl-x64.exe
after_build:
- signtool sign /f scripts/windows/key.p12 /p %secure% git-xl-*.exe
- iscc scripts\windows\inno-setup-git-xl-installer.iss
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "false")
{
Rename-Item -Path "git-xl-windows-0.0.0.exe" -NewName "git-xl-windows-$($env:APPVEYOR_REPO_COMMIT.substring(0,7)).exe"
}
- cmd: signtool sign /f scripts/windows/key.p12 /p %secure% git-xl-windows*.exe
test_script:
- C:\Python36\python -m unittest discover src -vv
- C:\Python36-x64\python -m unittest discover src -vv
on_success:
- ps: if ($env:APPVEYOR_REPO_TAG -eq $TRUE) { Invoke-RestMethod -Uri https://api.netlify.com/build_hooks/$env:NETLIFY_BUILD_HOOK -Method 'POST' -Body '' }
artifacts:
- path: git-xl-windows-*.exe
- path: git-xl-x86.exe
- path: git-xl-x64.exe
- path: git-xl-diff-x86.exe
- path: git-xl-diff-x64.exe
deploy:
- provider: GitHub
release: $(APPVEYOR_REPO_TAG_NAME)
description: 'Git XL $(APPVEYOR_REPO_TAG_NAME)'
auth_token:
secure: 9GWBZaQOmJ9Ex2gPWJ+vf8aVVbKM7lvu/cCvs8xlQppaS97LptyDjZIIaWbUEuTI
artifact: /git-xl-windows-.*\.exe/
draft: false
prerelease: false
on:
appveyor_repo_tag: true
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))