forked from xltrail/git-xl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
70 lines (61 loc) · 3.04 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
skip_branch_with_pr: true
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 .\git-xltrail-diff.py --name git-xltrail-diff-x86.exe --version-file .\scripts\windows\git-xltrail-version-info.py --icon .\scripts\windows\git-xltrail-logo.ico
- mv dist\git-xltrail-diff-x86.exe git-xltrail-diff-x86.exe
- C:\Python36-x64\Scripts\pyinstaller --onefile .\git-xltrail-diff.py --name git-xltrail-diff-x64.exe --version-file .\scripts\windows\git-xltrail-version-info.py --icon .\scripts\windows\git-xltrail-logo.ico
- mv dist\git-xltrail-diff-x64.exe git-xltrail-diff-x64.exe
- C:\Python36\Scripts\pyinstaller --onefile .\git-xltrail.py --name git-xltrail-x86.exe --version-file .\scripts\windows\git-xltrail-version-info.py --icon .\scripts\windows\git-xltrail-logo.ico
- mv dist\git-xltrail-x86.exe git-xltrail-x86.exe
- C:\Python36-x64\Scripts\pyinstaller --onefile .\git-xltrail.py --name git-xltrail-x64.exe --version-file .\scripts\windows\git-xltrail-version-info.py --icon .\scripts\windows\git-xltrail-logo.ico
- mv dist\git-xltrail-x64.exe git-xltrail-x64.exe
after_build:
- signtool sign /f scripts/windows/key.p12 /p %secure% git-xltrail-*.exe
- iscc scripts\windows\inno-setup-git-xltrail-installer.iss
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "false")
{
Rename-Item -Path "git-xltrail-windows-0.0.0.exe" -NewName "git-xltrail-windows-$($env:APPVEYOR_REPO_COMMIT.substring(0,7)).exe"
}
- cmd: signtool sign /f scripts/windows/key.p12 /p %secure% git-xltrail-windows*.exe
test_script:
- C:\Python36\python -m unittest discover -vv
- C:\Python36-x64\python -m unittest discover -vv
artifacts:
- path: git-xltrail-windows-*.exe
- path: git-xltrail-x86.exe
- path: git-xltrail-x64.exe
- path: git-xltrail-diff-x86.exe
- path: git-xltrail-diff-x64.exe
deploy:
- provider: GitHub
release: $(APPVEYOR_REPO_TAG_NAME)
description: 'Git xltrail $(APPVEYOR_REPO_TAG_NAME)'
auth_token:
secure: u1oi+34ucFzW+B5tKlGUMP2NjPISw4G61InbYVF3qYq6onAC4+rA92XRn+aDhMEW
artifact: /git-xltrail-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'))