-
Notifications
You must be signed in to change notification settings - Fork 16
/
.appveyor.yml
38 lines (38 loc) · 1.68 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
version: 1.0.{build}.{branch}
configuration: AppVeyor
environment:
GITHUB_PERSONAL_TOKEN:
secure: XD+aPg99N2rlEOr9Qr/P3it6joUuBMp/J0pGnchoenuLb15QZ6iEwgm44nwEU17i
install:
- set SSL_CERT_FILE=C:/ruby24-x64/ssl/cert.pem
- set PATH=C:\Ruby21\bin;%PATH%
- gem install ocra serialport
- for /f "tokens=2 delims=/" %%a in ("%APPVEYOR_REPO_NAME%") do set REPO_NAME="%%a"
before_build:
- nuget restore tool\NinjaScanLight_tools.sln
build:
project: tool\NinjaScanLight_tools.sln
verbosity: minimal
after_build:
- type nul > %APPVEYOR_REPO_COMMIT%.commit
- 7z a windows.%APPVEYOR_REPO_BRANCH%.zip %APPVEYOR_BUILD_FOLDER%\tool\build_VC\%CONFIGURATION%\*.exe %APPVEYOR_REPO_COMMIT%.commit -x!test_*.exe
test_script:
- for /r tool\build_VC\%CONFIGURATION% %%a in (test_*.exe) do %%a
artifacts:
- path: windows.*.zip
name: x86 binary
before_deploy:
- echo on
& for /f "usebackq delims=" %%a in (`git log --pretty^=format:%%cd -n 1`) do set TIMESTAMP="%%a"
& for /f "usebackq delims=" %%a in (`ruby -e 'require "time"^; print Time::parse^(ENV["TIMESTAMP"]^).strftime^("%%Y%%m%%d_%%H%%M%%S"^)'`) do set TIMESTAMP=%%a
- echo on
& mkdir artifacts\%REPO_NAME%\tool
& copy /b windows.%APPVEYOR_REPO_BRANCH%.zip artifacts\%REPO_NAME%\tool
- echo on
& mkdir C:\tmp
& curl -fL -o C:\tmp\ghcp.zip https://github.com/int128/ghcp/releases/download/v1.13.0/ghcp_windows_amd64.zip
& 7z e C:\tmp\ghcp.zip -oC:\tmp *.exe
deploy_script:
- echo on
& cd artifacts
& C:\tmp\ghcp.exe commit -u fenrir-naru -r archives -m "build by AppVeyor, %TIMESTAMP%" --token=%GITHUB_PERSONAL_TOKEN% %REPO_NAME%/tool/windows.%APPVEYOR_REPO_BRANCH%.zip