mirror of
https://github.com/bitwarden/browser
synced 2024-12-20 22:47:26 +01:00
78 lines
2.3 KiB
YAML
78 lines
2.3 KiB
YAML
image:
|
|
- Visual Studio 2017
|
|
|
|
branches:
|
|
except:
|
|
- l10n_master
|
|
|
|
init:
|
|
- 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'))
|
|
}
|
|
- ps: Install-Product node 10
|
|
- ps: |
|
|
$env:PATH = "C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\;${env:PATH}"
|
|
$env:DIST_DIR = "${env:APPVEYOR_BUILD_FOLDER}\dist\"
|
|
$env:DIST_SRC_DIR = "${env:DIST_DIR}Source\"
|
|
$env:REPO_URL = "https://github.com/${env:APPVEYOR_REPO_NAME}.git"
|
|
if($env:APPVEYOR_REPO_TAG -eq "true") {
|
|
$tagName = $env:APPVEYOR_REPO_TAG_NAME.TrimStart("v")
|
|
$env:RELEASE_NAME = "Version ${tagName}"
|
|
}
|
|
|
|
install:
|
|
- cmd: npm install -g gulp
|
|
- ps: choco install cloc --no-progress
|
|
- ps: cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
|
|
|
|
before_build:
|
|
- cmd: node --version
|
|
- cmd: npm --version
|
|
|
|
build_script:
|
|
- cmd: npm install
|
|
# Do normal build
|
|
- cmd: npm run dist
|
|
- cmd: npm run test
|
|
- cmd: gulp ci
|
|
# Build sources for reviewers
|
|
- cmd: |
|
|
call git clone --branch=%APPVEYOR_REPO_BRANCH% %REPO_URL% %DIST_SRC_DIR%
|
|
cd %DIST_SRC_DIR%
|
|
call git checkout %APPVEYOR_REPO_COMMIT%
|
|
call git submodule update --init --recursive
|
|
cd %DIST_DIR%
|
|
del /S/Q "%DIST_SRC_DIR%.git\objects\pack\*"
|
|
call 7z a browser-source-%APPVEYOR_BUILD_NUMBER%.zip "%DIST_SRC_DIR%\*"
|
|
cd %APPVEYOR_BUILD_FOLDER%
|
|
|
|
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'))
|
|
}
|
|
|
|
artifacts:
|
|
- path: dist/dist-opera-%APPVEYOR_BUILD_NUMBER%.zip
|
|
- path: dist/dist-chrome-%APPVEYOR_BUILD_NUMBER%.zip
|
|
- path: dist/dist-firefox-%APPVEYOR_BUILD_NUMBER%.zip
|
|
- path: dist/dist-edge-%APPVEYOR_BUILD_NUMBER%.zip
|
|
#- path: dist/dist-safari-%APPVEYOR_BUILD_NUMBER%.zip
|
|
- path: dist/browser-source-%APPVEYOR_BUILD_NUMBER%.zip
|
|
- path: coverage/coverage-%APPVEYOR_BUILD_NUMBER%.zip
|
|
|
|
deploy:
|
|
tag: $(APPVEYOR_REPO_TAG_NAME)
|
|
release: $(RELEASE_NAME)
|
|
provider: GitHub
|
|
auth_token: $(GH_TOKEN)
|
|
artifact: /.*/
|
|
force_update: true
|
|
on:
|
|
branch: master
|
|
APPVEYOR_REPO_TAG: true
|