mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 01:11:13 -06:00
update the windows scripts
This commit is contained in:
parent
b7067fca9a
commit
4fe14351aa
@ -23,7 +23,7 @@ files:
|
||||
extraFiles:
|
||||
- 'config/Symphony.config'
|
||||
- 'config/titleBarStyles.css'
|
||||
- 'assets/dictionaries/**'
|
||||
- 'dictionaries/**'
|
||||
- 'library/libsymphonysearch.dylib'
|
||||
- 'library/indexvalidator.exec'
|
||||
- 'library/cryptoLib.dylib'
|
||||
|
@ -10,7 +10,26 @@ if ! [ -x "$(command -v node)" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
nvm use default
|
||||
if ! [ -x "$(command -v npm)" ]; then
|
||||
echo 'NPM does not exist! Please set it up before running this script!' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [ -x "$(command -v /usr/local/bin/packagesbuild)" ]; then
|
||||
echo 'Packages build does not exist! Please set it up before running this script!' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [ -x "$(command -v gulp)" ]; then
|
||||
echo 'Gulp does not exist! Install it for setting expiry!' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$PARENT_BUILD_VERSION" ]; then
|
||||
echo "PARENT_BUILD_VERSION is empty, setting default"
|
||||
PARENT_BUILD_VERSION="0"
|
||||
fi
|
||||
|
||||
NODE_VERSION=$(node --version)
|
||||
echo "Node Version: ${NODE_VERSION}"
|
||||
|
||||
@ -30,10 +49,16 @@ echo "Setting default pod url to https://corporate.symphony.com"
|
||||
sed -i -e 's/\"url\"[[:space:]]*\:[[:space:]]*\".*\"/\"url\":\"https:\/\/corporate.symphony.com\"/g' config/Symphony.config
|
||||
# setup the build version
|
||||
echo "Setting build version to ${PARENT_BUILD_VERSION}"
|
||||
sed -i -e "s/\"buildNumber\"[[:space:]]*\:[[:space:]]*\".*\"/\"buildNumber\":\"${PARENT_BUILD_VERSION}\"/g" package.json
|
||||
sed -i -e "s/\"buildNumber\"[[:space:]]*\:[[:space:]]*\".*\"/\"buildNumber\":\" ${PARENT_BUILD_VERSION}\"/g" package.json
|
||||
# replace version number in pre-install script
|
||||
echo "Setting package version in pre install script to ${PKG_VERSION}"
|
||||
sed -i -e "s/CURRENT_VERSION=APP_VERSION/CURRENT_VERSION=${PKG_VERSION}/g" ./installer/mac/preinstall.sh
|
||||
|
||||
if [ -z "$EXPIRY_PERIOD" ]; then
|
||||
echo 'Expiry period not set, so, not creating expiry for the build'
|
||||
else
|
||||
gulp setExpiry --period ${EXPIRY_PERIOD}
|
||||
fi
|
||||
|
||||
echo "Running tests, code coverage, linting and building..."
|
||||
npm run packed-linux
|
||||
|
@ -10,6 +10,11 @@ if ! [ -x "$(command -v node)" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [ -x "$(command -v npm)" ]; then
|
||||
echo 'NPM does not exist! Please set it up before running this script!' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [ -x "$(command -v /usr/local/bin/packagesbuild)" ]; then
|
||||
echo 'Packages build does not exist! Please set it up before running this script!' >&2
|
||||
exit 1
|
||||
|
@ -1,5 +1,7 @@
|
||||
echo "invoking visual dev tools..."
|
||||
:: 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
|
||||
@ -10,12 +12,34 @@ echo %PATH%
|
||||
set PATH=%PATH%;C:\Program Files (x86)\GnuWin32\bin
|
||||
echo %PATH%
|
||||
|
||||
WHERE git
|
||||
if (%ERRORLEVEL% > 0) then (
|
||||
echo "GIT does not exist. Please set it up before running this script."
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
WHERE node
|
||||
if (%ERRORLEVEL% > 0) then (
|
||||
echo "NODE does not exist. Please set it up before running this script."
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
WHERE npm
|
||||
if (%ERRORLEVEL% > 0) then (
|
||||
echo "NPM does not exist. Please set it up before running this script."
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
WHERE gulp
|
||||
if (%ERRORLEVEL% > 0) then (
|
||||
echo "GULP does not exist. Please set it up before running this script."
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
:: Below command replaces buildVersion with the appropriate build number from jenkins
|
||||
:: https://superuser.com/questions/339118/regex-replace-from-command-line
|
||||
sed -i -e "s/\"buildNumber\"[[:space:]]*\:[[:space:]]*\".*\"/\"buildNumber\":\"%PARENT_BUILD_VERSION%\"/g" package.json
|
||||
|
||||
sed -i -e "s/\"electronDist\"[[:space:]]*\:[[:space:]]*\".*\"/\"electronDist\":\"C:\\jenkins\\workspace\\R64\"/g" package.json
|
||||
|
||||
:: Copy search libraries onto the project root
|
||||
echo "Copying search libraries"
|
||||
echo D | xcopy /y "C:\jenkins\workspace\tronlibraries\library" "library"
|
||||
|
||||
@ -23,8 +47,14 @@ echo "Running npm install..."
|
||||
call npm install
|
||||
|
||||
call npm i -g gulp-cli
|
||||
echo "Setting expiry to days: %EXPIRY_PERIOD%"
|
||||
call gulp setExpiry --period %EXPIRY_PERIOD%
|
||||
|
||||
:: Set expiry if required
|
||||
IF ("%EXPIRY_PERIOD%"=="") then (
|
||||
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
|
||||
|
@ -1,19 +1,45 @@
|
||||
echo "invoking visual dev tools..."
|
||||
:: 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 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% > 0) then (
|
||||
echo "GIT does not exist. Please set it up before running this script."
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
WHERE node
|
||||
if (%ERRORLEVEL% > 0) then (
|
||||
echo "NODE does not exist. Please set it up before running this script."
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
WHERE npm
|
||||
if (%ERRORLEVEL% > 0) then (
|
||||
echo "NPM does not exist. Please set it up before running this script."
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
WHERE gulp
|
||||
if (%ERRORLEVEL% > 0) then (
|
||||
echo "GULP does not exist. Please set it up before running this script."
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
:: Below command replaces buildVersion with the appropriate build number from jenkins
|
||||
:: https://superuser.com/questions/339118/regex-replace-from-command-line
|
||||
sed -i -e "s/\"buildNumber\"[[:space:]]*\:[[:space:]]*\".*\"/\"buildNumber\":\"%PARENT_BUILD_VERSION%\"/g" package.json
|
||||
|
||||
sed -i -e "s/\"electronDist\"[[:space:]]*\:[[:space:]]*\".*\"/\"electronDist\":\"C:\\jenkins\\workspace\\R64\"/g" package.json
|
||||
|
||||
:: Copy search libraries onto the project root
|
||||
echo "Copying search libraries"
|
||||
echo D | xcopy /y "C:\jenkins\workspace\tronlibraries\library" "library"
|
||||
|
||||
@ -21,8 +47,14 @@ echo "Running npm install..."
|
||||
call npm install
|
||||
|
||||
call npm i -g gulp-cli
|
||||
echo "Setting expiry to days: %EXPIRY_PERIOD%"
|
||||
call gulp setExpiry --period %EXPIRY_PERIOD%
|
||||
|
||||
echo "Building the 64 bit version..."
|
||||
:: Set expiry if required
|
||||
IF ("%EXPIRY_PERIOD%"=="") then (
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user