1
0
mirror of https://github.com/bitwarden/browser synced 2024-12-11 08:46:16 +01:00
bitwarden-estensione-browser/appveyor.yml

84 lines
1.8 KiB
YAML
Raw Normal View History

2019-03-08 20:44:02 +01:00
image:
- Visual Studio 2017
- Ubuntu1804
branches:
except:
- l10n_master
- gh-pages
services:
- docker
stack: node 10
init:
2019-03-13 15:38:49 +01:00
- ps: |
if($isWindows) {
Install-Product node 10
}
2019-03-08 20:44:02 +01:00
install:
2019-03-13 15:38:49 +01:00
- ps: |
$env:PACKAGE_VERSION = (Get-Content -Raw -Path .\package.json | ConvertFrom-Json).version
2019-03-20 03:17:03 +01:00
$env:PUSH_DOCKER = "false"
2019-03-13 15:38:49 +01:00
$env:PROD_DEPLOY = "false"
$env:TAG_NAME = ""
if($env:APPVEYOR_REPO_TAG -eq "true" -and $env:APPVEYOR_RE_BUILD -eq "True") {
$env:PROD_DEPLOY = "true"
$env:TAG_NAME = $env:APPVEYOR_REPO_TAG_NAME.TrimStart("v")
echo "This is a production deployment for ${env:TAG_NAME}."
}
2019-03-20 03:17:03 +01:00
if("${env:DOCKER_USERNAME}" -ne "" -and "${env:DOCKER_PASSWORD}" -ne "") {
$env:PUSH_DOCKER = "true"
}
2019-03-13 15:38:49 +01:00
if($isWindows) {
choco install cloc --no-progress
cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
}
2019-03-08 20:44:02 +01:00
before_build:
2019-03-12 20:37:32 +01:00
- node --version
- npm --version
2019-03-13 15:38:49 +01:00
- sh: |
2019-03-20 03:17:03 +01:00
if [ "${PUSH_DOCKER}" == "true" ]
2019-03-13 15:38:49 +01:00
then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
fi
2019-03-12 21:02:39 +01:00
- cmd: set "GIT_PATH=C:\Program Files\Git\mingw64\libexec\git-core"
- cmd: set "PATH=%GIT_PATH%;%PATH%"
2019-03-08 20:44:02 +01:00
build_script:
2019-03-13 15:38:49 +01:00
- sh: chmod +x ./build.sh
- ps: |
if($isLinux) {
./build.sh
./build.sh tag dev
if($env:PROD_DEPLOY -eq "true") {
./build.sh tag beta
./build.sh tag $env:TAG_NAME
}
docker images
2019-03-20 03:17:03 +01:00
if($env:PUSH_DOCKER -eq "true") {
./build.sh push dev
2019-03-13 15:38:49 +01:00
2019-03-20 03:17:03 +01:00
if($env:PROD_DEPLOY -eq "true") {
./build.sh push beta
./build.sh push latest
./build.sh push $env:TAG_NAME
}
2019-03-13 15:38:49 +01:00
}
}
2019-03-12 21:10:08 +01:00
- cmd: npm install
- cmd: npm run build:prod
2019-03-08 20:44:02 +01:00
after_build:
2019-03-20 03:17:03 +01:00
- sh: |
if [ "${PUSH_DOCKER}" == "true" ]
then
docker logout
fi