1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-18 11:05:41 +01:00
bitwarden-browser/appveyor.yml

78 lines
2.3 KiB
YAML
Raw Normal View History

2019-03-14 15:23:58 +01:00
image:
- Visual Studio 2017
branches:
except:
- l10n_master
init:
2019-03-15 06:01:13 +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-14 15:23:58 +01:00
- ps: Install-Product node 10
2019-03-14 17:57:01 +01:00
- 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"
2019-03-21 04:14:02 +01:00
if($env:APPVEYOR_REPO_TAG -eq "true") {
$tagName = $env:APPVEYOR_REPO_TAG_NAME.TrimStart("v")
$env:RELEASE_NAME = "Version ${tagName}"
}
2019-03-14 15:23:58 +01:00
install:
2019-03-14 15:38:08 +01:00
- cmd: npm install -g gulp
2019-03-14 15:23:58 +01:00
- ps: choco install cloc --no-progress
- ps: cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
before_build:
2019-03-14 15:38:08 +01:00
- cmd: node --version
- cmd: npm --version
2019-03-14 15:23:58 +01:00
build_script:
2019-03-14 15:38:08 +01:00
- cmd: npm install
2019-03-14 15:23:58 +01:00
# Do normal build
2019-03-14 15:38:08 +01:00
- cmd: npm run dist
- cmd: npm run test
- cmd: gulp ci
2019-03-14 15:23:58 +01:00
# Build sources for reviewers
- cmd: |
2019-03-14 17:57:01 +01:00
call git clone --branch=%APPVEYOR_REPO_BRANCH% %REPO_URL% %DIST_SRC_DIR%
2019-03-14 15:23:58 +01:00
cd %DIST_SRC_DIR%
2019-03-14 17:57:01 +01:00
call git checkout %APPVEYOR_REPO_COMMIT%
call git submodule update --init --recursive
2019-03-14 15:23:58 +01:00
cd %DIST_DIR%
2019-03-14 17:57:01 +01:00
del /S/Q "%DIST_SRC_DIR%.git\objects\pack\*"
call 7z a browser-source-%APPVEYOR_BUILD_NUMBER%.zip "%DIST_SRC_DIR%\*"
2019-03-14 15:23:58 +01:00
cd %APPVEYOR_BUILD_FOLDER%
2019-03-14 15:32:45 +01:00
2019-03-15 06:01:13 +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-14 15:32:45 +01:00
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
2020-03-05 17:13:55 +01:00
- path: dist/dist-edge-%APPVEYOR_BUILD_NUMBER%.zip
2019-09-04 19:35:01 +02:00
#- path: dist/dist-safari-%APPVEYOR_BUILD_NUMBER%.zip
2019-03-14 15:32:45 +01:00
- path: dist/browser-source-%APPVEYOR_BUILD_NUMBER%.zip
- path: coverage/coverage-%APPVEYOR_BUILD_NUMBER%.zip
2019-03-14 15:48:07 +01:00
deploy:
2019-03-21 04:14:02 +01:00
tag: $(APPVEYOR_REPO_TAG_NAME)
release: $(RELEASE_NAME)
2019-03-14 15:48:07 +01:00
provider: GitHub
auth_token: $(GH_TOKEN)
artifact: /.*/
force_update: true
on:
branch: master
APPVEYOR_REPO_TAG: true