mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-28 03:33:49 -06:00
build scripts
- create build script for macOS - create build script for linux - create build script for windows - create build script for windows x86
This commit is contained in:
parent
cc66907740
commit
14e6975590
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"url": "https://foundation-dev.symphony.com",
|
"url":"https://corporate.symphony.com",
|
||||||
"minimizeOnClose" : true,
|
"minimizeOnClose" : true,
|
||||||
"launchOnStartup" : true,
|
"launchOnStartup" : true,
|
||||||
"alwaysOnTop" : false,
|
"alwaysOnTop" : false,
|
||||||
|
@ -12,7 +12,7 @@ delete_app()
|
|||||||
compare_versions()
|
compare_versions()
|
||||||
{
|
{
|
||||||
# Get the installer version:
|
# Get the installer version:
|
||||||
CURRENT_VERSION=APP_VERSION
|
CURRENT_VERSION=5.0.0
|
||||||
|
|
||||||
# Get the currently installed version:
|
# Get the currently installed version:
|
||||||
INSTALLED_VERSION=$(plutil -p /Applications/Symphony.app/Contents/Info.plist | awk '/CFBundleShortVersionString/ {print substr($3, 2, length($3)-2)}')
|
INSTALLED_VERSION=$(plutil -p /Applications/Symphony.app/Contents/Info.plist | awk '/CFBundleShortVersionString/ {print substr($3, 2, length($3)-2)}')
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
"includeConsoleLog": true,
|
"includeConsoleLog": true,
|
||||||
"theme": "lightTheme",
|
"theme": "lightTheme",
|
||||||
"sort": "status",
|
"sort": "status",
|
||||||
"outputPath": "./out/Unit Tests Report.html"
|
"outputPath": "./dist/coverage/UnitTestsReport.html"
|
||||||
}]
|
}]
|
||||||
],
|
],
|
||||||
"setupFiles": [
|
"setupFiles": [
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"productName": "Symphony",
|
"productName": "Symphony",
|
||||||
"version": "5.0.0",
|
"version": "5.0.0",
|
||||||
"clientVersion": "2.0.1",
|
"clientVersion": "2.0.1",
|
||||||
"buildNumber": "0",
|
"buildNumber":"",
|
||||||
"searchAPIVersion": "1.55.3",
|
"searchAPIVersion": "1.55.3",
|
||||||
"description": "Symphony desktop app (Foundation ODP)",
|
"description": "Symphony desktop app (Foundation ODP)",
|
||||||
"author": "Symphony OSS <help@finos.org>",
|
"author": "Symphony OSS <help@finos.org>",
|
||||||
|
39
scripts/build-linux.sh
Normal file
39
scripts/build-linux.sh
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if ! [ -x "$(command -v git)" ]; then
|
||||||
|
echo 'GIT does not exist! Please set it up before running this script!' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [ -x "$(command -v node)" ]; then
|
||||||
|
echo 'NODE does not exist! Please set it up before running this script!' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
nvm use default
|
||||||
|
NODE_VERSION=$(node --version)
|
||||||
|
echo "Node Version: ${NODE_VERSION}"
|
||||||
|
|
||||||
|
if [ ! -d "$HOME/tronlibraries/library" ]; then
|
||||||
|
echo 'Search libraries do not exist! Not building with swift search' >&2
|
||||||
|
else
|
||||||
|
cp -r "$HOME/tronlibraries/library" .
|
||||||
|
fi
|
||||||
|
|
||||||
|
PKG_VERSION=$(node -e "console.log(require('./package.json').version);")
|
||||||
|
|
||||||
|
# Install app dependencies
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# replace url in config
|
||||||
|
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
|
||||||
|
# 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
|
||||||
|
|
||||||
|
echo "Running tests, code coverage, linting and building..."
|
||||||
|
npm run packed-linux
|
65
scripts/build-mac.sh
Executable file
65
scripts/build-mac.sh
Executable file
@ -0,0 +1,65 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if ! [ -x "$(command -v git)" ]; then
|
||||||
|
echo 'GIT does not exist! Please set it up before running this script!' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [ -x "$(command -v node)" ]; then
|
||||||
|
echo 'NODE 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
|
||||||
|
|
||||||
|
nvm use default
|
||||||
|
NODE_VERSION=$(node --version)
|
||||||
|
echo "Node Version: ${NODE_VERSION}"
|
||||||
|
|
||||||
|
if [ ! -d "$HOME/tronlibraries/library" ]; then
|
||||||
|
echo 'Search libraries do not exist! Not building with swift search' >&2
|
||||||
|
else
|
||||||
|
cp -r "$HOME/tronlibraries/library" .
|
||||||
|
fi
|
||||||
|
|
||||||
|
PKG_VERSION=$(node -e "console.log(require('./package.json').version);")
|
||||||
|
|
||||||
|
# Install app dependencies
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# replace url in config
|
||||||
|
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
|
||||||
|
# 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
|
||||||
|
|
||||||
|
echo "Running tests, code coverage, linting and building..."
|
||||||
|
npm run unpacked-mac
|
||||||
|
|
||||||
|
APP_BUILD=dist/mac/Symphony.app
|
||||||
|
|
||||||
|
# Test if app was built and exists, if not, exit
|
||||||
|
if [ ! -e ${APP_BUILD} ]; then
|
||||||
|
echo "BUILD FAILED: app does not exist: ${APP_BUILD}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "App created: ${APP_BUILD}"
|
||||||
|
|
||||||
|
# Create .pkg installer
|
||||||
|
echo "Creating .pkg"
|
||||||
|
/usr/local/bin/packagesbuild -v installer/mac/symphony-mac-packager.pkgproj
|
||||||
|
PACKAGE=installer/mac/build/Symphony.pkg
|
||||||
|
|
||||||
|
if [ ! -e ${PACKAGE} ]; then
|
||||||
|
echo "BUILD PACKAGE FAILED: package not created: ${PACKAGE}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Package created: ${PACKAGE}"
|
30
scripts/build-win32.bat
Normal file
30
scripts/build-win32.bat
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
echo "invoking visual dev tools..."
|
||||||
|
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%
|
||||||
|
|
||||||
|
:: 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
|
||||||
|
|
||||||
|
echo "Copying search libraries"
|
||||||
|
echo D | xcopy /y "C:\jenkins\workspace\tronlibraries\library" "library"
|
||||||
|
|
||||||
|
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 "Running tests, code coverage, linting and building..."
|
||||||
|
call npm run unpacked-win-x86
|
28
scripts/build-win64.bat
Normal file
28
scripts/build-win64.bat
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
echo "invoking visual dev tools..."
|
||||||
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"
|
||||||
|
echo %PATH%
|
||||||
|
|
||||||
|
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%
|
||||||
|
|
||||||
|
:: 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
|
||||||
|
|
||||||
|
echo "Copying search libraries"
|
||||||
|
echo D | xcopy /y "C:\jenkins\workspace\tronlibraries\library" "library"
|
||||||
|
|
||||||
|
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..."
|
||||||
|
call npm run unpacked-win
|
Loading…
Reference in New Issue
Block a user