-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathappveyor.yml
82 lines (69 loc) · 3.95 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
79
80
81
82
version: 1.0.{build}
branches:
only:
- MUSHclient
skip_tags: true
skip_branch_with_pr: true
image: Visual Studio 2015
clone_depth: 1
environment:
auth_token:
secure: sc2iImdfbB8Q0GWI90ElJqiWh9kCN/siFoVoJx1+XgAyG67GE2pzGQ+uzPQHU1Bt
install:
- ps: pushd C:\
- ps: Start-FileDownload 'https://github.com/fiendish/LuaJIT-build/releases/download/latest/lua51.dll'
- ps: Start-FileDownload 'https://github.com/fiendish/lua-llthreads2-build/releases/download/latest/llthreads2.dll'
- ps: Start-FileDownload 'https://github.com/fiendish/lua-openssl-build/releases/download/latest/openssl.dll'
- ps: Start-FileDownload 'https://github.com/nickgammon/mushclient/releases/download/latest_commit/MUSHclient.exe'
- ps: pushd C:\projects\aardwolfclientpackage
- ps: |
Move-Item C:\lua51.dll MUSHclient -force
Move-Item C:\llthreads2.dll MUSHclient -force
Move-Item C:\openssl.dll MUSHclient -force
Move-Item C:\MUSHclient.exe MUSHclient -force
$env:PACKAGE_VERSION=(Get-Content MUSHclient\AardwolfPackageChanges.txt)[2].split()[0]
7z a -tzip -mx=9 -mfb=257 Aardwolf_MUSHclient_$($env:PACKAGE_VERSION)_no_install.zip MUSHclient
Start-FileDownload 'https://raw.githubusercontent.com/fiendish/aardwolfclientpackage-installer/master/aardmush_installer.nsi'
Start-FileDownload 'https://raw.githubusercontent.com/fiendish/aardwolfclientpackage-installer/master/get_version.nsi'
Start-FileDownload 'https://raw.githubusercontent.com/fiendish/aardwolfclientpackage-installer/master/hello.rtf'
- cmd: '"C:\Program Files (x86)\NSIS\makensis.exe" aardmush_installer.nsi'
- ps: |
function Insert-Content { param ( [String]$Path ); process { $( ,$_; Get-Content $Path -ea SilentlyContinue) | Out-File -encoding ASCII $Path } }
"aard_req_novisuals_mode = true -- this line added by the no-visuals installer`r`n" | Insert-Content .\MUSHclient\lua\aard_requirements.lua
Move-Item .\MUSHclient\worlds\Aardwolf_no_visuals.mcl .\MUSHclient\worlds\Aardwolf.mcl -force
$env:VIAPPOUT = 'OutFile "Aardwolf_MUSHclient_${PackageVersion}_no_visuals.exe"'
(Get-Content aardmush_installer.nsi) | ForEach-Object { $_ -replace "OutFile.+" , "$env:VIAPPOUT" } | Set-Content aardmush_installer.nsi
- cmd: '"C:\Program Files (x86)\NSIS\makensis.exe" aardmush_installer.nsi'
- ps: |
7z a -tzip -mx=9 -mfb=257 Aardwolf_MUSHclient_$($env:PACKAGE_VERSION)_no_visuals_no_install.zip .\MUSHclient
Get-ChildItem .\Aardwolf_MUSHclient_r*.exe -Recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
Get-ChildItem .\Aardwolf_MUSHclient_r*.zip -Recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
git checkout -- .
build: off
before_deploy:
- ps: >-
$env:PACKAGE_VERSION=(Get-Content MUSHclient\AardwolfPackageChanges.txt)[2].split()[0]
git config --global credential.helper store
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:auth_token):[email protected]`n"
git config --global user.name "fiendish"
git config --global user.email "[email protected]"
git remote set-branches --add origin 'gh-pages' 2>&1 | write-host
git fetch --depth 1 origin gh-pages 2>&1 | write-host
git checkout gh-pages 2>&1 | write-host
(Get-Content index.template).replace("%%REV%%", "$env:PACKAGE_VERSION") | Set-Content index.html
(Get-Content unzip_upgrading.template).replace("%%REV%%", "$env:PACKAGE_VERSION") | Set-Content unzip_upgrading.html
git add index.html 2>&1 | write-host
git add unzip_upgrading.html 2>&1 | write-host
git commit -q -m "automatic rev update $env:PACKAGE_VERSION"
git push -q origin gh-pages
deploy:
- provider: GitHub
tag: $(PACKAGE_VERSION)
auth_token:
secure: sc2iImdfbB8Q0GWI90ElJqiWh9kCN/siFoVoJx1+XgAyG67GE2pzGQ+uzPQHU1Bt
artifact: /Aardwolf_MUSHclient_r.*\.(exe|zip)/
force_update: true
on:
branch: MUSHclient
after_deploy:
- cmd: