mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +00:00
ab1087ed4e
update InstallBuilder
88 lines
2.9 KiB
YAML
88 lines
2.9 KiB
YAML
version: '{build}'
|
|
build: off # Not a C# project
|
|
|
|
branches:
|
|
except:
|
|
- requires-io-master
|
|
|
|
environment:
|
|
CI_DEPS: codecov>=2.0.5
|
|
CI_COMMANDS: codecov
|
|
matrix:
|
|
- PYTHON: "C:\\Python35"
|
|
TOXENV: "py35"
|
|
# TODO: ENABLE WHEN AVAILABLE
|
|
# - PYTHON: "C:\\Python36"
|
|
# TOXENV: "py36"
|
|
|
|
SNAPSHOT_HOST:
|
|
secure: NeTo57s2rJhCd/mjKHetXVxCFd3uhr8txnjnAXD1tUI=
|
|
SNAPSHOT_PORT:
|
|
secure: TiJPtg60/edYTH8RnoBErg==
|
|
SNAPSHOT_USER:
|
|
secure: 6yBwmO5gv4vAwoFYII8qjQ==
|
|
SNAPSHOT_PASS:
|
|
secure: LPjrtFrWxYhOVGXzfPRV1GjtZE/wHoKq9m/PI6hSalfysUK5p2DxTG9uHlb4Q9qV
|
|
RTOOL_KEY:
|
|
secure: 0a+UUNbA+JjquyAbda4fd0JmiwL06AdG6torRPdCvbPDbKHnaW/BHHp1nRPytOKM
|
|
|
|
install:
|
|
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
|
|
- "python -m pip install --disable-pip-version-check -U pip"
|
|
- "pip install -U tox"
|
|
|
|
test_script:
|
|
- ps: "tox -- --verbose --cov-report=term"
|
|
- ps: |
|
|
$Env:VERSION = $(python mitmproxy/version.py)
|
|
$Env:SKIP_MITMPROXY = "python -c `"print('skip mitmproxy')`""
|
|
tox -e wheel
|
|
tox -e rtool -- bdist
|
|
|
|
- ps: |
|
|
if(
|
|
($Env:TOXENV -match "py35") -and !$Env:APPVEYOR_PULL_REQUEST_NUMBER -and
|
|
(($Env:APPVEYOR_REPO_BRANCH -In ("master", "pyinstaller")) -or ($Env:APPVEYOR_REPO_TAG -match "true"))
|
|
) {
|
|
echo "Decrypt license..."
|
|
tox -e rtool -- decrypt release\installbuilder\license.xml.enc release\installbuilder\license.xml
|
|
$ibSetup = "C:\projects\mitmproxy\release\installbuilder-installer.exe"
|
|
$ibVersion = "17.4.0"
|
|
if (!(Test-Path $ibSetup)) {
|
|
echo "Download InstallBuilder..."
|
|
(New-Object System.Net.WebClient).DownloadFile(
|
|
"https://installbuilder.bitrock.com/installbuilder-enterprise-$ibVersion-windows-installer.exe",
|
|
$ibSetup
|
|
)
|
|
}
|
|
echo "Install InstallBuilder..."
|
|
Start-Process $ibSetup "--mode unattended --unattendedmodeui none" -Wait
|
|
echo "Run InstallBuilder..."
|
|
& "C:\Program Files (x86)\BitRock InstallBuilder Enterprise $ibVersion\bin\builder-cli.exe" `
|
|
build `
|
|
.\release\installbuilder\mitmproxy.xml `
|
|
windows `
|
|
--license .\release\installbuilder\license.xml `
|
|
--setvars project.version=$Env:VERSION `
|
|
--verbose
|
|
echo "Installer build completed."
|
|
}
|
|
|
|
deploy_script:
|
|
# we build binaries on every run, but we only upload them for master snapshots or tags.
|
|
ps: |
|
|
if(
|
|
($Env:TOXENV -match "py35") -and
|
|
(($Env:APPVEYOR_REPO_BRANCH -In ("master", "pyinstaller")) -or ($Env:APPVEYOR_REPO_TAG -match "true"))
|
|
) {
|
|
tox -e rtool -- upload-snapshot --bdist --wheel --installer
|
|
}
|
|
|
|
cache:
|
|
- C:\projects\mitmproxy\release\installbuilder-installer.exe -> .appveyor.yml
|
|
- C:\Users\appveyor\AppData\Local\pip\cache
|
|
|
|
notifications:
|
|
- provider: Slack
|
|
incoming_webhook: https://hooks.slack.com/services/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
|