mirror of
https://github.com/bitwarden/browser
synced 2024-12-25 09:32:06 +01:00
ci builds
This commit is contained in:
parent
45134f903d
commit
059260d318
40
appveyor.yml
Normal file
40
appveyor.yml
Normal file
@ -0,0 +1,40 @@
|
||||
image:
|
||||
- Visual Studio 2017
|
||||
- Ubuntu1804
|
||||
|
||||
branches:
|
||||
except:
|
||||
- l10n_master
|
||||
- gh-pages
|
||||
|
||||
environment:
|
||||
APPVEYOR_YML_DISABLE_PS_LINUX: true
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
stack: node 10
|
||||
|
||||
init:
|
||||
- ps: Install-Product node $env:nodejs_version
|
||||
|
||||
install:
|
||||
- sh: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||
- ps: choco install cloc --no-progress
|
||||
- ps: cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
|
||||
- ps: $env:package_version = (Get-Content -Raw -Path package.json | ConvertFrom-Json).version
|
||||
|
||||
before_build:
|
||||
- cmd: node --version
|
||||
- cmd: npm --version
|
||||
- cmd: set "GIT_PATH=C:\Program Files\Git\mingw64\libexec\git-core"
|
||||
- cmd: set "PATH=%GIT_PATH%;%PATH%"
|
||||
|
||||
build_script:
|
||||
- sh: chmod +x ./build-ci.sh
|
||||
- sh: ./build-ci.sh
|
||||
- cmd: npm install
|
||||
- cmd: npm run build:prod
|
||||
|
||||
after_build:
|
||||
- sh: docker logout
|
36
build-ci.sh
Normal file
36
build-ci.sh
Normal file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
echo "Repo tag name: ${APPVEYOR_REPO_TAG_NAME}"
|
||||
echo "Rebuild: ${APPVEYOR_RE_BUILD}"
|
||||
|
||||
PROD_DEPLOY=false
|
||||
TAG_NAME=""
|
||||
if [ "${APPVEYOR_REPO_TAG_NAME}" != "" -a "${APPVEYOR_RE_BUILD}" == "true" ]
|
||||
then
|
||||
PROD_DEPLOY=true
|
||||
TAG_NAME=${APPVEYOR_REPO_TAG_NAME#"v"}
|
||||
fi
|
||||
|
||||
npm install
|
||||
npm run build:prod
|
||||
|
||||
chmod +x ./build.sh
|
||||
./build.sh
|
||||
./build.sh tag dev
|
||||
|
||||
if [ "${PROD_DEPLOY}" == "true" ]
|
||||
then
|
||||
./build.sh tag beta
|
||||
./build.sh tag $TAG_NAME
|
||||
fi
|
||||
|
||||
docker images
|
||||
./build.sh push dev
|
||||
|
||||
if [ "${PROD_DEPLOY}" == "true" ]
|
||||
then
|
||||
./build.sh push beta
|
||||
./build.sh push latest
|
||||
./build.sh push $TAG_NAME
|
||||
fi
|
Loading…
Reference in New Issue
Block a user