2019-03-14 22:12:02 +01:00
|
|
|
image:
|
|
|
|
- Visual Studio 2017
|
|
|
|
|
|
|
|
branches:
|
|
|
|
except:
|
|
|
|
- l10n_master
|
|
|
|
|
|
|
|
environment:
|
2019-03-15 04:28:49 +01:00
|
|
|
WIN_PKG: C:\Users\appveyor\.pkg-cache\v2.5\fetched-v10.4.1-win-x64
|
2019-03-14 22:12:02 +01:00
|
|
|
|
|
|
|
init:
|
|
|
|
- ps: Install-Product node 10
|
2019-03-15 03:11:10 +01:00
|
|
|
- ps: |
|
|
|
|
if($env:DEBUG_RDP -eq "true") {
|
|
|
|
iex ((new-object net.webclient).DownloadString(`
|
|
|
|
'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
|
|
|
}
|
2019-03-14 22:15:25 +01:00
|
|
|
|
|
|
|
install:
|
2019-03-15 03:57:12 +01:00
|
|
|
- ps: |
|
|
|
|
$env:PACKAGE_VERSION = (Get-Content -Raw -Path .\package.json | ConvertFrom-Json).version
|
2019-03-15 04:18:30 +01:00
|
|
|
$env:PATH = "C:\Program Files (x86)\Resource Hacker;${env:PATH}"
|
2019-03-15 04:28:49 +01:00
|
|
|
if(Test-Path -Path $env:WIN_PKG) {
|
2019-03-15 04:36:05 +01:00
|
|
|
$env:VER_INFO = "true"
|
2019-03-15 03:57:12 +01:00
|
|
|
}
|
2019-03-14 22:12:02 +01:00
|
|
|
- ps: choco install reshack --no-progress
|
|
|
|
- ps: choco install cloc --no-progress
|
2019-03-15 00:11:31 +01:00
|
|
|
- ps: choco install checksum --no-progress
|
2019-03-14 22:12:02 +01:00
|
|
|
- ps: cloc --include-lang TypeScript,JavaScript --vcs git
|
|
|
|
- ps: .\scripts\make-versioninfo.ps1
|
|
|
|
|
|
|
|
before_build:
|
|
|
|
- cmd: node --version
|
|
|
|
- cmd: npm --version
|
|
|
|
|
|
|
|
build_script:
|
2019-03-15 04:28:49 +01:00
|
|
|
- cmd: |
|
2019-03-15 04:36:05 +01:00
|
|
|
if defined VER_INFO ResourceHacker -open %WIN_PKG% -save %WIN_PKG% -action delete -mask ICONGROUP,1,
|
|
|
|
if defined VER_INFO ResourceHacker -open version-info.rc -save version-info.res -action compile
|
|
|
|
if defined VER_INFO ResourceHacker -open %WIN_PKG% -save %WIN_PKG% -action addoverwrite -resource version-info.res
|
2019-03-14 22:12:02 +01:00
|
|
|
- cmd: npm install
|
|
|
|
- cmd: npm run dist
|
|
|
|
- cmd: 7z a ./dist/bw-windows-%PACKAGE_VERSION%.zip ./dist/windows/bw.exe
|
|
|
|
- cmd: 7z a ./dist/bw-macos-%PACKAGE_VERSION%.zip ./dist/macos/bw
|
|
|
|
- cmd: 7z a ./dist/bw-linux-%PACKAGE_VERSION%.zip ./dist/linux/bw
|
|
|
|
- ps: .\scripts\choco-pack.ps1
|
2019-03-15 00:11:31 +01:00
|
|
|
- ps: |
|
2019-03-15 00:15:14 +01:00
|
|
|
checksum -f="./dist/bw-windows-${env:PACKAGE_VERSION}.zip" `
|
|
|
|
-t sha256 | Out-File ./dist/bw-windows-sha256-${env:PACKAGE_VERSION}.txt
|
|
|
|
checksum -f="./dist/bw-macos-${env:PACKAGE_VERSION}.zip" `
|
|
|
|
-t sha256 | Out-File ./dist/bw-macos-sha256-${env:PACKAGE_VERSION}.txt
|
|
|
|
checksum -f="./dist/bw-linux-${env:PACKAGE_VERSION}.zip" `
|
|
|
|
-t sha256 | Out-File ./dist/bw-linux-sha256-${env:PACKAGE_VERSION}.txt
|
2019-03-14 22:12:02 +01:00
|
|
|
|
2019-03-15 03:11:10 +01:00
|
|
|
on_finish:
|
|
|
|
- ps: |
|
|
|
|
if($env:DEBUG_RDP -eq "true") {
|
|
|
|
$blockRdp = $true
|
|
|
|
iex ((new-object net.webclient).DownloadString(`
|
|
|
|
'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
|
|
|
}
|
|
|
|
|
2019-03-14 22:12:02 +01:00
|
|
|
artifacts:
|
2019-03-15 00:11:31 +01:00
|
|
|
- path: dist/bw-windows-%PACKAGE_VERSION%.zip
|
|
|
|
- path: dist/bw-macos-%PACKAGE_VERSION%.zip
|
|
|
|
- path: dist/bw-linux-%PACKAGE_VERSION%.zip
|
|
|
|
- path: dist/bw-windows-sha256-%PACKAGE_VERSION%.txt
|
|
|
|
- path: dist/bw-macos-sha256-%PACKAGE_VERSION%.txt
|
|
|
|
- path: dist/bw-linux-sha256-%PACKAGE_VERSION%.txt
|
2019-03-14 22:12:02 +01:00
|
|
|
- path: dist/chocolatey/bitwarden-cli.%PACKAGE_VERSION%.nupkg
|
|
|
|
|
|
|
|
cache:
|
2019-03-14 22:32:29 +01:00
|
|
|
- 'C:\Users\appveyor\.pkg-cache\ -> package.json'
|
2019-03-14 22:12:02 +01:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: GitHub
|
|
|
|
auth_token: $(GH_TOKEN)
|
|
|
|
artifact: /.*/
|
|
|
|
force_update: true
|
|
|
|
on:
|
|
|
|
branch: master
|
|
|
|
APPVEYOR_REPO_TAG: true
|