2019-03-12 17:31:30 +01:00
|
|
|
image:
|
2019-03-13 05:23:08 +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:
|
2019-03-15 06:01:26 +01:00
|
|
|
- ps: |
|
|
|
|
if($isWindows -and $env:DEBUG_RDP -eq "true") {
|
|
|
|
iex ((new-object net.webclient).DownloadString(`
|
|
|
|
'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
|
|
|
}
|
2019-03-12 19:39:09 +01:00
|
|
|
- sh: sudo apt-get update
|
|
|
|
- sh: sudo apt-get -y install pkg-config libxss-dev libsecret-1-dev rpm
|
|
|
|
- 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 05:07:36 +01:00
|
|
|
$env:PACKAGE_VERSION = (Get-Content -Raw -Path .\src\package.json | ConvertFrom-Json).version
|
|
|
|
$env: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 05:07:36 +01:00
|
|
|
$env: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:59:35 +01:00
|
|
|
|
|
|
|
before_build:
|
|
|
|
- node --version
|
|
|
|
- npm --version
|
2019-03-13 05:29:51 +01:00
|
|
|
# Get new $SNAP_TOKEN with:
|
|
|
|
# $ snapcraft export-login --snaps bitwarden --acls package_push,package_release -
|
2019-03-13 04:34:59 +01:00
|
|
|
- sh: |
|
2019-03-13 05:07:36 +01:00
|
|
|
if [ "${SNAP_TOKEN}" != "" -a "${PROD_DEPLOY}" == "true" ]
|
2019-03-13 04:34:59 +01:00
|
|
|
then
|
2019-03-13 05:39:21 +01:00
|
|
|
sudo snap install snapcraft --classic
|
2019-03-13 04:51:03 +01:00
|
|
|
echo "$SNAP_TOKEN" | snapcraft login --with -
|
2019-03-13 04:34:59 +01:00
|
|
|
fi
|
2019-03-13 05:23:08 +01:00
|
|
|
- ps: |
|
2019-03-13 05:25:23 +01:00
|
|
|
if($isWindows -and $env:CHOCO_API_KEY -ne $null -and $env:PROD_DEPLOY -eq "true") {
|
2019-03-13 05:23:08 +01:00
|
|
|
choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/
|
|
|
|
}
|
2019-03-12 17:31:30 +01:00
|
|
|
|
|
|
|
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 05:07:36 +01:00
|
|
|
Push-AppveyorArtifact ./dist/Bitwarden-${env:PACKAGE_VERSION}-x86_64.AppImage
|
|
|
|
Push-AppveyorArtifact ./dist/bitwarden_${env:PACKAGE_VERSION}_amd64.snap
|
|
|
|
Push-AppveyorArtifact ./dist/Bitwarden-${env:PACKAGE_VERSION}-amd64.deb
|
|
|
|
Push-AppveyorArtifact ./dist/Bitwarden-${env:PACKAGE_VERSION}-x64.freebsd
|
|
|
|
Push-AppveyorArtifact ./dist/Bitwarden-${env: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 05:07:36 +01:00
|
|
|
Push-AppveyorArtifact .\dist\Bitwarden-Portable-${env:PACKAGE_VERSION}.exe
|
|
|
|
Push-AppveyorArtifact .\dist\nsis-web\Bitwarden-Installer-${env:PACKAGE_VERSION}.exe
|
|
|
|
Push-AppveyorArtifact .\dist\Bitwarden-${env:PACKAGE_VERSION}-x64.appx
|
|
|
|
Push-AppveyorArtifact .\dist\Bitwarden-${env: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 05:07:36 +01:00
|
|
|
if($env:PROD_DEPLOY -eq "true") {
|
2019-03-12 21:37:36 +01:00
|
|
|
if($isLinux) {
|
|
|
|
echo "Deploy Linux..."
|
2019-03-13 05:07:36 +01:00
|
|
|
./scripts/snap-update.ps1 -version $env:PACKAGE_VERSION
|
2019-03-12 21:37:36 +01:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
echo "Deploy Windows..."
|
2019-03-17 04:31:36 +01:00
|
|
|
.\scripts\choco-update.ps1 -version $env:PACKAGE_VERSION
|
2019-03-12 21:37:36 +01:00
|
|
|
}
|
2019-03-12 20:32:16 +01:00
|
|
|
}
|
2019-03-13 04:51:03 +01:00
|
|
|
- sh: |
|
2019-03-13 05:23:08 +01:00
|
|
|
if [ "${SNAP_TOKEN}" != "" -a "${PROD_DEPLOY}" == "true" ]
|
2019-03-13 04:51:03 +01:00
|
|
|
then
|
|
|
|
snapcraft logout
|
|
|
|
fi
|
2019-03-12 20:32:16 +01:00
|
|
|
|
2019-03-15 06:01:26 +01:00
|
|
|
on_finish:
|
|
|
|
- ps: |
|
|
|
|
if($isWindows -and $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-12 19:28:32 +01:00
|
|
|
for:
|
2019-03-12 19:53:00 +01:00
|
|
|
-
|
|
|
|
matrix:
|
2019-03-12 19:28:32 +01:00
|
|
|
only:
|
|
|
|
- image: Visual Studio 2017
|
|
|
|
cache:
|
2019-03-23 03:23:50 +01:00
|
|
|
- '%LOCALAPPDATA%\electron'
|
|
|
|
- '%LOCALAPPDATA%\electron-builder'
|
2019-03-12 19:28:32 +01:00
|
|
|
|
2019-03-12 19:53:00 +01:00
|
|
|
-
|
|
|
|
matrix:
|
2019-03-12 19:28:32 +01:00
|
|
|
only:
|
|
|
|
- image: Ubuntu1804
|
|
|
|
cache:
|
2019-03-23 03:23:50 +01:00
|
|
|
- '/home/appveyor/.cache/electron'
|
|
|
|
- '/home/appveyor/.cache/electron-builder'
|