mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 01:11:13 -06:00
4d3455b3a4
* SDA-3733 - Update electron version to 19 * Remove electron-rebuild dependency * Switch to node version 16.13.2 * Remove rebuild script * Bump napi * Use node 16.13.2 * remove @types dependency * Bump node version for build-mac.sh * Bump run-script-os and screen-share-indicator-frame * updated electron and electron-builder * Capture unhandled rejections * Remove swift search * Update to version 19 * Swift Shader is no longer part of 19 builds * Update ci node version * SDA-3733 - Bump electron version to 19.0.2
73 lines
2.1 KiB
Batchfile
73 lines
2.1 KiB
Batchfile
:: Check to ensure that the VSDev command prompt is in the below location
|
|
echo "Starting VSDev Command Prompt"
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"
|
|
|
|
echo %PATH%
|
|
|
|
set DISABLE_REBUILD=true
|
|
set NODE_REQUIRED_VERSION=16.13.2
|
|
set SNYK_ORG=sda
|
|
set SNYK_PROJECT_NAME="Symphony Desktop Application"
|
|
|
|
set PATH=%PATH%;C:\Program Files\nodejs\;C:\Program Files\Git\cmd
|
|
echo %PATH%
|
|
|
|
set PATH=%PATH%;C:\Program Files (x86)\GnuWin32\bin
|
|
echo %PATH%
|
|
|
|
WHERE git
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo "GIT does not exist. Please set it up before running this script."
|
|
EXIT /B 1
|
|
)
|
|
|
|
WHERE nvm
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo "NVM does not exist. Please set it up before running this script."
|
|
EXIT /B 1
|
|
)
|
|
|
|
call nvm install %NODE_REQUIRED_VERSION%
|
|
call nvm use %NODE_REQUIRED_VERSION%
|
|
|
|
WHERE gulp
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo "GULP does not exist. Installing it."
|
|
call npm i gulp -g
|
|
)
|
|
|
|
WHERE snyk
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo "Snyk does not exist! Installing and setting it up"
|
|
call npm i snyk -g
|
|
)
|
|
echo "Setting snyk org to %SNYK_ORG% and api token to %SNYK_API_TOKEN%"
|
|
call snyk config set org=%SNYK_ORG%
|
|
call snyk config set api=%SNYK_API_TOKEN%
|
|
|
|
:: Below command replaces buildVersion with the appropriate build number from jenkins
|
|
sed -i -e "s/\"buildNumber\"[[:space:]]*\:[[:space:]]*\".*\"/\"buildNumber\":\"%PARENT_BUILD_VERSION%\"/g" package.json
|
|
|
|
:: Copy search libraries onto the project root
|
|
echo "Copying search libraries"
|
|
echo D | xcopy /y "C:\jenkins\workspace\tronlibraries\library" "library"
|
|
|
|
echo "Installing dependencies..."
|
|
call npm install
|
|
|
|
# Run Snyk Security Tests
|
|
echo "Running snyk security tests"
|
|
call snyk test --file=package-lock.json --org=%SNYK_ORG%
|
|
call snyk monitor --file=package-lock.json --org=%SNYK_ORG% --project-name=%SNYK_PROJECT_NAME%
|
|
|
|
:: Set expiry if required
|
|
IF "%EXPIRY_PERIOD%"=="" (
|
|
echo "Not setting expiry for the build!"
|
|
) else (
|
|
echo "Setting expiry to days: %EXPIRY_PERIOD%"
|
|
call gulp setExpiry --period %EXPIRY_PERIOD%
|
|
)
|
|
|
|
echo "Running tests, code coverage, linting and building..."
|
|
call npm run unpacked-win-x86
|