mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-07 09:31:31 +01:00
76 lines
2.5 KiB
YAML
76 lines
2.5 KiB
YAML
image:
|
|
- Visual Studio 2017
|
|
|
|
branches:
|
|
except:
|
|
- l10n_master
|
|
|
|
environment:
|
|
WIN_PKG_PATH: C:\Users\appveyor\.pkg-cache\v2.5\fetched-v10.4.1-win-x64
|
|
|
|
init:
|
|
- ps: Install-Product node 10
|
|
|
|
install:
|
|
- ps: $env:PACKAGE_VERSION = (Get-Content -Raw -Path .\package.json | ConvertFrom-Json).version
|
|
- ps: choco install reshack --no-progress
|
|
- ps: choco install cloc --no-progress
|
|
- ps: choco install checksum --no-progress
|
|
- ps: cloc --include-lang TypeScript,JavaScript --vcs git
|
|
- ps: .\scripts\make-versioninfo.ps1
|
|
|
|
before_build:
|
|
- cmd: node --version
|
|
- cmd: npm --version
|
|
|
|
build_script:
|
|
- ps: |
|
|
if(Test-Path -Path $env:WIN_PKG_PATH) {
|
|
echo "Updating pkg resources"
|
|
$rh = "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe"
|
|
Start-Process -FilePath $rh -ArgumentList `
|
|
"-open $env:WIN_PKG_PATH -save $env:WIN_PKG_PATH -action delete -mask ICONGROUP,1,"
|
|
Start-Process -FilePath $rh -ArgumentList `
|
|
"-open .\version-info.rc -save .\version-info.res -action compile"
|
|
Start-Process -FilePath $rh -ArgumentList `
|
|
"-open $env:WIN_PKG_PATH -save $env:WIN_PKG_PATH -action addoverwrite -resource .\version-info.res,"
|
|
ls
|
|
cd C:\Users\appveyor\.pkg-cache\v2.5
|
|
ls
|
|
cd $env:APPVEYOR_BUILD_FOLDER
|
|
}
|
|
- 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
|
|
- ps: |
|
|
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
|
|
|
|
artifacts:
|
|
- 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
|
|
- path: dist/chocolatey/bitwarden-cli.%PACKAGE_VERSION%.nupkg
|
|
|
|
cache:
|
|
- 'C:\Users\appveyor\.pkg-cache\ -> package.json'
|
|
|
|
deploy:
|
|
provider: GitHub
|
|
auth_token: $(GH_TOKEN)
|
|
artifact: /.*/
|
|
force_update: true
|
|
on:
|
|
branch: master
|
|
APPVEYOR_REPO_TAG: true
|