1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-12 01:48:21 +02:00
bitwarden-browser/appveyor.yml

90 lines
2.2 KiB
YAML
Raw Normal View History

2019-03-12 17:31:30 +01:00
image:
2019-03-13 04:35:20 +01:00
#- Visual Studio 2017
2019-03-12 17:31:30 +01:00
- Ubuntu1804
branches:
except:
- l10n_master
stack: node 10
2019-03-12 19:39:09 +01:00
init:
- sh: sudo apt-get update
- sh: sudo apt-get -y install pkg-config libxss-dev libsecret-1-dev rpm
2019-03-13 04:34:59 +01:00
- sh: sudo snap install snapcraft --classic
2019-03-12 19:39:09 +01:00
- ps: |
if($isWindows) {
Install-Product node 10
}
2019-03-12 17:31:30 +01:00
install:
2019-03-12 17:52:59 +01:00
- ps: |
2019-03-13 04:41:53 +01:00
$PACKAGE_VERSION = (Get-Content -Raw -Path .\src\package.json | ConvertFrom-Json).version
$PROD_DEPLOY = $false
2019-03-13 03:10:40 +01:00
if($env:APPVEYOR_REPO_TAG -eq "true" -and $env:APPVEYOR_RE_BUILD -eq "True") {
2019-03-13 04:41:53 +01:00
$PROD_DEPLOY = $true
2019-03-13 03:10:40 +01:00
echo "This is a production deployment."
2019-03-12 20:32:16 +01:00
}
2019-03-12 17:52:59 +01:00
if($isWindows) {
choco install cloc --no-progress
cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
}
2019-03-13 04:34:59 +01:00
- sh: |
2019-03-13 04:45:29 +01:00
if [ "${SNAP_TOKEN}" != "" ]
2019-03-13 04:34:59 +01:00
then
2019-03-13 04:37:47 +01:00
echo "login to snap"
2019-03-13 04:34:59 +01:00
echo "$SNAP_TOKEN" | snapcraft login --with -
2019-03-13 04:37:47 +01:00
snapcraft whoami
2019-03-13 04:34:59 +01:00
fi
2019-03-12 17:31:30 +01:00
before_build:
- node --version
- npm --version
build_script:
- npm install
- ps: |
2019-03-12 17:52:59 +01:00
if($isLinux) {
2019-03-12 18:46:06 +01:00
npm run dist:lin
2019-03-13 04:41:53 +01:00
Push-AppveyorArtifact ./dist/Bitwarden-${PACKAGE_VERSION}-x86_64.AppImage
Push-AppveyorArtifact ./dist/bitwarden_${PACKAGE_VERSION}_amd64.snap
Push-AppveyorArtifact ./dist/Bitwarden-${PACKAGE_VERSION}-amd64.deb
Push-AppveyorArtifact ./dist/Bitwarden-${PACKAGE_VERSION}-x64.freebsd
Push-AppveyorArtifact ./dist/Bitwarden-${PACKAGE_VERSION}-x86_64.rpm
2019-03-12 17:52:59 +01:00
}
else {
2019-03-12 18:46:06 +01:00
npm run dist:win:ci
2019-03-13 04:41:53 +01:00
Push-AppveyorArtifact .\dist\Bitwarden-Portable-${PACKAGE_VERSION}.exe
Push-AppveyorArtifact .\dist\nsis-web\Bitwarden-Installer-${PACKAGE_VERSION}.exe
Push-AppveyorArtifact .\dist\Bitwarden-${PACKAGE_VERSION}-x64.appx
Push-AppveyorArtifact .\dist\Bitwarden-${PACKAGE_VERSION}-ia32.appx
2019-03-12 17:52:59 +01:00
}
2019-03-12 19:02:17 +01:00
2019-03-12 20:32:16 +01:00
after_build:
- ps: |
2019-03-13 04:41:53 +01:00
if($PROD_DEPLOY) {
2019-03-12 21:37:36 +01:00
if($isLinux) {
echo "Deploy Linux..."
}
else {
echo "Deploy Windows..."
}
2019-03-12 20:32:16 +01:00
}
for:
2019-03-12 19:53:00 +01:00
-
matrix:
only:
- image: Visual Studio 2017
cache:
2019-03-13 03:22:10 +01:00
- '%LOCALAPPDATA%\electron -> appveyor.yml'
- '%LOCALAPPDATA%\electron-builder -> appveyor.yml'
2019-03-12 19:53:00 +01:00
-
matrix:
only:
- image: Ubuntu1804
cache:
- '/home/appveyor/.cache/electron -> appveyor.yml'
- '/home/appveyor/.cache/electron-builder -> appveyor.yml'