mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
update the windows scripts
This commit is contained in:
parent
b7067fca9a
commit
4fe14351aa
@ -23,7 +23,7 @@ files:
|
|||||||
extraFiles:
|
extraFiles:
|
||||||
- 'config/Symphony.config'
|
- 'config/Symphony.config'
|
||||||
- 'config/titleBarStyles.css'
|
- 'config/titleBarStyles.css'
|
||||||
- 'assets/dictionaries/**'
|
- 'dictionaries/**'
|
||||||
- 'library/libsymphonysearch.dylib'
|
- 'library/libsymphonysearch.dylib'
|
||||||
- 'library/indexvalidator.exec'
|
- 'library/indexvalidator.exec'
|
||||||
- 'library/cryptoLib.dylib'
|
- 'library/cryptoLib.dylib'
|
||||||
|
@ -10,7 +10,26 @@ if ! [ -x "$(command -v node)" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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)
|
NODE_VERSION=$(node --version)
|
||||||
echo "Node Version: ${NODE_VERSION}"
|
echo "Node Version: ${NODE_VERSION}"
|
||||||
|
|
||||||
@ -35,5 +54,11 @@ sed -i -e "s/\"buildNumber\"[[:space:]]*\:[[:space:]]*\".*\"/\"buildNumber\":\"$
|
|||||||
echo "Setting package version in pre install script to ${PKG_VERSION}"
|
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
|
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..."
|
echo "Running tests, code coverage, linting and building..."
|
||||||
npm run packed-linux
|
npm run packed-linux
|
||||||
|
@ -10,6 +10,11 @@ if ! [ -x "$(command -v node)" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
if ! [ -x "$(command -v /usr/local/bin/packagesbuild)" ]; then
|
||||||
echo 'Packages build does not exist! Please set it up before running this script!' >&2
|
echo 'Packages build does not exist! Please set it up before running this script!' >&2
|
||||||
exit 1
|
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"
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"
|
||||||
|
|
||||||
echo %PATH%
|
echo %PATH%
|
||||||
|
|
||||||
set DISABLE_REBUILD=true
|
set DISABLE_REBUILD=true
|
||||||
@ -10,12 +12,34 @@ echo %PATH%
|
|||||||
set PATH=%PATH%;C:\Program Files (x86)\GnuWin32\bin
|
set PATH=%PATH%;C:\Program Files (x86)\GnuWin32\bin
|
||||||
echo %PATH%
|
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
|
:: 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/\"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 "Copying search libraries"
|
||||||
echo D | xcopy /y "C:\jenkins\workspace\tronlibraries\library" "library"
|
echo D | xcopy /y "C:\jenkins\workspace\tronlibraries\library" "library"
|
||||||
|
|
||||||
@ -23,8 +47,14 @@ echo "Running npm install..."
|
|||||||
call npm install
|
call npm install
|
||||||
|
|
||||||
call npm i -g gulp-cli
|
call npm i -g gulp-cli
|
||||||
|
|
||||||
|
:: Set expiry if required
|
||||||
|
IF ("%EXPIRY_PERIOD%"=="") then (
|
||||||
|
echo "Not setting expiry for the build!"
|
||||||
|
) else (
|
||||||
echo "Setting expiry to days: %EXPIRY_PERIOD%"
|
echo "Setting expiry to days: %EXPIRY_PERIOD%"
|
||||||
call gulp setExpiry --period %EXPIRY_PERIOD%
|
call gulp setExpiry --period %EXPIRY_PERIOD%
|
||||||
|
)
|
||||||
|
|
||||||
echo "Running tests, code coverage, linting and building..."
|
echo "Running tests, code coverage, linting and building..."
|
||||||
call npm run unpacked-win-x86
|
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"
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"
|
||||||
|
|
||||||
echo %PATH%
|
echo %PATH%
|
||||||
|
|
||||||
|
set DISABLE_REBUILD=true
|
||||||
|
|
||||||
set PATH=%PATH%;C:\Program Files\nodejs\;C:\Program Files\Git\cmd
|
set PATH=%PATH%;C:\Program Files\nodejs\;C:\Program Files\Git\cmd
|
||||||
echo %PATH%
|
echo %PATH%
|
||||||
|
|
||||||
set PATH=%PATH%;C:\Program Files (x86)\GnuWin32\bin
|
set PATH=%PATH%;C:\Program Files (x86)\GnuWin32\bin
|
||||||
echo %PATH%
|
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
|
:: 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/\"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 "Copying search libraries"
|
||||||
echo D | xcopy /y "C:\jenkins\workspace\tronlibraries\library" "library"
|
echo D | xcopy /y "C:\jenkins\workspace\tronlibraries\library" "library"
|
||||||
|
|
||||||
@ -21,8 +47,14 @@ echo "Running npm install..."
|
|||||||
call npm install
|
call npm install
|
||||||
|
|
||||||
call npm i -g gulp-cli
|
call npm i -g gulp-cli
|
||||||
|
|
||||||
|
:: Set expiry if required
|
||||||
|
IF ("%EXPIRY_PERIOD%"=="") then (
|
||||||
|
echo "Not setting expiry for the build!"
|
||||||
|
) else (
|
||||||
echo "Setting expiry to days: %EXPIRY_PERIOD%"
|
echo "Setting expiry to days: %EXPIRY_PERIOD%"
|
||||||
call gulp setExpiry --period %EXPIRY_PERIOD%
|
call gulp setExpiry --period %EXPIRY_PERIOD%
|
||||||
|
)
|
||||||
|
|
||||||
echo "Building the 64 bit version..."
|
echo "Running tests, code coverage, linting and building..."
|
||||||
call npm run unpacked-win
|
call npm run unpacked-win
|
||||||
|
Loading…
Reference in New Issue
Block a user