1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-14 10:16:02 +01:00
bitwarden-desktop/appveyor.yml
Kyle Spearrin 51215577a2 fixes
2019-03-12 23:51:03 -04:00

94 lines
2.3 KiB
YAML

image:
#- Visual Studio 2017
- Ubuntu1804
branches:
except:
- l10n_master
stack: node 10
init:
- sh: sudo apt-get update
- sh: sudo apt-get -y install pkg-config libxss-dev libsecret-1-dev rpm
- sh: sudo snap install snapcraft --classic
- ps: |
if($isWindows) {
Install-Product node 10
}
install:
- ps: |
$PACKAGE_VERSION = (Get-Content -Raw -Path .\src\package.json | ConvertFrom-Json).version
$PROD_DEPLOY = "false"
if($env:APPVEYOR_REPO_TAG -eq "true" -and $env:APPVEYOR_RE_BUILD -eq "True") {
$PROD_DEPLOY = "true"
echo "This is a production deployment."
}
if($isWindows) {
choco install cloc --no-progress
cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
}
- sh: |
echo "prod deploy: ${PROD_DEPLOY}"
if [ "${SNAP_TOKEN}" != "" ]
then
echo "$SNAP_TOKEN" | snapcraft login --with -
fi
before_build:
- node --version
- npm --version
build_script:
- npm install
- ps: |
if($isLinux) {
npm run dist:lin
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
}
else {
npm run dist:win:ci
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
}
after_build:
- ps: |
if($PROD_DEPLOY -eq "true") {
if($isLinux) {
echo "Deploy Linux..."
}
else {
echo "Deploy Windows..."
}
}
- sh: |
if [ "${SNAP_TOKEN}" != "" ]
then
snapcraft logout
fi
for:
-
matrix:
only:
- image: Visual Studio 2017
cache:
- '%LOCALAPPDATA%\electron -> appveyor.yml'
- '%LOCALAPPDATA%\electron-builder -> appveyor.yml'
-
matrix:
only:
- image: Ubuntu1804
cache:
- '/home/appveyor/.cache/electron -> appveyor.yml'
- '/home/appveyor/.cache/electron-builder -> appveyor.yml'