mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-02 08:40:08 +01:00
set envs and release_name from ps
This commit is contained in:
parent
a7dadd45e0
commit
863581735c
25
appveyor.yml
25
appveyor.yml
@ -7,11 +7,15 @@ branches:
|
|||||||
|
|
||||||
init:
|
init:
|
||||||
- ps: Install-Product node 10
|
- ps: Install-Product node 10
|
||||||
- cmd: |
|
- ps: |
|
||||||
SET PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\;%PATH%
|
$env:PATH = "C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\;${env:PATH}"
|
||||||
SET DIST_DIR=%APPVEYOR_BUILD_FOLDER%\dist\
|
$env:DIST_DIR = "${env:APPVEYOR_BUILD_FOLDER}\dist\"
|
||||||
SET DIST_SRC_DIR=%DIST_DIR%Source\
|
$env:DIST_SRC_DIR = "${env:DIST_DIR}Source\"
|
||||||
SET REPO_URL=https://github.com/%APPVEYOR_REPO_NAME%.git
|
$env:REPO_URL = "https://github.com/${env:APPVEYOR_REPO_NAME}.git"
|
||||||
|
$env:RELEASE_NAME = ""
|
||||||
|
if($env:APPVEYOR_REPO_TAG -eq "true") {
|
||||||
|
$env:RELEASE_NAME = "Version ${env:APPVEYOR_REPO_TAG_NAME.TrimStart("v")}"
|
||||||
|
}
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- cmd: npm install -g gulp
|
- cmd: npm install -g gulp
|
||||||
@ -30,13 +34,13 @@ build_script:
|
|||||||
- cmd: gulp ci
|
- cmd: gulp ci
|
||||||
# Build sources for reviewers
|
# Build sources for reviewers
|
||||||
- cmd: |
|
- cmd: |
|
||||||
CALL git clone --branch=%APPVEYOR_REPO_BRANCH% %REPO_URL% %DIST_SRC_DIR%
|
call git clone --branch=%APPVEYOR_REPO_BRANCH% %REPO_URL% %DIST_SRC_DIR%
|
||||||
cd %DIST_SRC_DIR%
|
cd %DIST_SRC_DIR%
|
||||||
CALL git checkout %APPVEYOR_REPO_COMMIT%
|
call git checkout %APPVEYOR_REPO_COMMIT%
|
||||||
CALL git submodule update --init --recursive
|
call git submodule update --init --recursive
|
||||||
cd %DIST_DIR%
|
cd %DIST_DIR%
|
||||||
DEL /S/Q "%DIST_SRC_DIR%.git\objects\pack\*"
|
del /S/Q "%DIST_SRC_DIR%.git\objects\pack\*"
|
||||||
CALL 7z a browser-source-%APPVEYOR_BUILD_NUMBER%.zip "%DIST_SRC_DIR%\*"
|
call 7z a browser-source-%APPVEYOR_BUILD_NUMBER%.zip "%DIST_SRC_DIR%\*"
|
||||||
cd %APPVEYOR_BUILD_FOLDER%
|
cd %APPVEYOR_BUILD_FOLDER%
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -49,6 +53,7 @@ artifacts:
|
|||||||
- path: coverage/coverage-%APPVEYOR_BUILD_NUMBER%.zip
|
- path: coverage/coverage-%APPVEYOR_BUILD_NUMBER%.zip
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
release: $(RELEASE_NAME)
|
||||||
provider: GitHub
|
provider: GitHub
|
||||||
auth_token: $(GH_TOKEN)
|
auth_token: $(GH_TOKEN)
|
||||||
artifact: /.*/
|
artifact: /.*/
|
||||||
|
Loading…
Reference in New Issue
Block a user