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

23 lines
610 B
Batchfile
Raw Normal View History

2018-03-28 21:31:53 +02:00
@echo off
cd %~dp0
SETLOCAL
2018-03-28 21:36:17 +02:00
2018-03-28 21:31:53 +02:00
SET DIST_DIR=%APPVEYOR_BUILD_FOLDER%\dist\
SET DIST_SRC_DIR=%DIST_DIR%Source\
SET REPO_URL=https://github.com/%APPVEYOR_REPO_NAME%.git
2018-03-28 21:53:01 +02:00
:: Do normal build
2018-03-28 21:57:44 +02:00
ECHO ## Build dist
2018-03-28 21:53:01 +02:00
CALL npm run dist
:: Build sources for reviewers
2018-03-28 21:57:44 +02:00
ECHO ## Build sources
2018-03-28 21:53:01 +02:00
CALL git clone --branch=%APPVEYOR_REPO_BRANCH% %REPO_URL% %DIST_SRC_DIR%
2018-03-28 21:31:53 +02:00
cd %DIST_SRC_DIR%
2018-03-28 21:53:01 +02:00
CALL git checkout %APPVEYOR_REPO_COMMIT%
CALL git submodule update --init --recursive
2018-03-28 21:31:53 +02:00
cd %DIST_DIR%
DEL /S/Q "%DIST_SRC_DIR%.git\objects\pack\*"
2018-03-28 22:12:57 +02:00
CALL 7z a browser-source-%APPVEYOR_BUILD_NUMBER%.zip "%DIST_SRC_DIR%\*"
2018-03-28 21:31:53 +02:00
cd %APPVEYOR_BUILD_FOLDER%