-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
96 lines (86 loc) · 3.34 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
image:
- Visual Studio 2017
- Ubuntu
platform:
- x64
environment:
PKG_CACHE_PATH: '%USERPROFILE%\pkg-cache'
cache:
- '%APPDATA%\npm-cache'
- '%LOCALAPPDATA%\bower'
- '%USERPROFILE%\pkg-cache'
- '~/.npm'
# - '../nodecg/node_modules'
# - '../nodecg/bundles/%APPVEYOR_PROJECT_SLUG%/node_modules'
stack: node 12
install:
- ps: |
if ($isWindows) {
Install-Product node 12 x64
}
- cmd: choco install reshack --no-progress
- sh: export PATH="$(yarn global bin):$PATH"
- git config --global url.git://github.com/.insteadOf https://github.com/
- git reset --hard HEAD
- npm install -g bower pkg parcel-bundler
- npm ci
- bower install
- npm run build
- npm ci --production
before_build:
- yarn --version
- npm --version
build_script:
- ps: |
if ($isWindows) {
$env:RH_PATH = "C:\Program Files (x86)\Resource Hacker"
$env:PATH = "$env:RH_PATH;$env:PATH"
$env:TARGET_EXE = "dashboard.exe"
$env:TARGET_PLATFORM = "node12-win-x64"
} else {
$env:TARGET_EXE = "dashboard"
$env:TARGET_PLATFORM = "node12-linux-x64"
}
- cd ..
- git clone https://github.com/nodecg/nodecg.git
- cd nodecg
- git checkout v1.4.1
- ps: '(Get-Content ./package.json).Replace("""main"": ""index.js""","""main"": ""index.js"", ""bin"": ""index.js""") | Out-File ./package.json -Encoding ASCII'
- npm ci
- bower install
# Delete git directory files so they are not included in the final package.
- ps: Remove-Item ./.git -Force -Recurse
- ps: Remove-Item $env:APPVEYOR_BUILD_FOLDER/.git -Force -Recurse
# Move project files to bundles for use by nodecg
- ps: Move-Item $env:APPVEYOR_BUILD_FOLDER\make-versioninfo.ps1 .
- ps: Move-Item $env:APPVEYOR_BUILD_FOLDER bundles/$env:APPVEYOR_PROJECT_SLUG
- ps: New-Item -ItemType Directory -Force -Path ./instrumented
- ps: pkg . --targets $env:TARGET_PLATFORM --public -o $env:TARGET_EXE
- ps: New-Item -ItemType Directory -Force -Path ./cfg
- ps: |
if ($isWindows) {
.\make-versioninfo.ps1
Write-Host "This is obviously a test of sanity"
}
#- cmd: ResourceHacker -open .\version-info.rc -save .\version-info.res -action compile
#- cmd: ResourceHacker -open %TARGET_EXE% -save %TARGET_EXE% -action addoverwrite -resource .\version-info.res
- ps: '"{""logging"": {""console"": {""level"": ""info""},""file"": {""enabled"": true,""level"": ""debug""},""replicants"": false}}" | Out-File cfg/nodecg.json -Encoding ASCII'
- ps: Start-FileDownload 'https://www.dropbox.com/s/nv229lvugehx8jt/alttp-restreamer-demo.json?dl=1' -FileName 'cfg/alttp-restreamer.json'
after_build:
- ps: |
if ($isWindows) {
$env:PKG_ZIP_NAME = "alttp-restreamer-$env:APPVEYOR_BUILD_VERSION-$(-join $env:APPVEYOR_REPO_COMMIT[0..7]).zip"
$env:TARGET_EXE = "dashboard.exe"
} else {
$env:PKG_ZIP_NAME = "alttp-restreamer-$env:APPVEYOR_BUILD_VERSION-$(-join $env:APPVEYOR_REPO_COMMIT[0..7]).tar.gz"
$env:TARGET_EXE = "dashboard"
}
- cmd: 7z a %PKG_ZIP_NAME% %TARGET_EXE% cfg
- sh: chmod +x $TARGET_EXE
- sh: tar czf $PKG_ZIP_NAME $TARGET_EXE cfg
- ps: New-Item -ItemType Directory -Force -Path $env:APPVEYOR_BUILD_FOLDER
- ps: Move-Item $env:PKG_ZIP_NAME $env:APPVEYOR_BUILD_FOLDER
test: off
artifacts:
- path: '%PKG_ZIP_NAME%'
name: pkg-alttp-restreamer