From 45b4083b706544896c746ddb1f5770d945eb4b47 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Tue, 15 Dec 2020 12:26:04 +0530 Subject: [PATCH] chore: move full build process to script for win --- scripts/build-mac.sh | 2 +- scripts/build-win64.bat | 90 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/scripts/build-mac.sh b/scripts/build-mac.sh index 0864bc7b..8af12fec 100755 --- a/scripts/build-mac.sh +++ b/scripts/build-mac.sh @@ -4,7 +4,7 @@ echo "Unlocking keychain" security -v unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_NAME" -NODE_REQUIRED_VERSION=v12.18.3 +NODE_REQUIRED_VERSION=v12.13.1 SNYK_ORG=sda SNYK_PROJECT_NAME="Symphony Desktop Application" diff --git a/scripts/build-win64.bat b/scripts/build-win64.bat index e147b0ec..15763e39 100644 --- a/scripts/build-win64.bat +++ b/scripts/build-win64.bat @@ -58,3 +58,93 @@ IF "%EXPIRY_PERIOD%"=="" ( echo "Running tests, code coverage, linting and building..." call npm run unpacked-win + +echo "Updating 64 bit installer file with hashed passwd..." + +set hashedPasswdFile=%HASHED_PASSWORD_FILE_PATH% + +if NOT EXIST %hashedPasswdFile% ( + echo "can not find hashed password file in: " %hashedPasswdFile% + exit /b -1 +) + +set /p hashedPasswd=<%hashedPasswdFile% + +set installerFile=installer\win\Symphony-x64.aip +if NOT EXIST %installerFile% ( + echo "can not find installer file in: " %installerFile% + exit /b -1 +) + +call powershell -Command "(get-content %installerFile%) | foreach-object {$_ -replace '4A99BAA4D493EE030480AF53BA42EA11CCFB627AB1800400DA9692073D68C522A10A4FD0B5F78525294E51AC7194D55B5EE1D31F', '%hashedPasswd%'} | set-content %installerFile%" + +echo "creating 64 bit msi..." + +rem add AdvancedInstaller.com to PATH +set PATH="%PATH%";C:\Program Files\nodejs\;C:\Program Files (x86)\Caphyon\Advanced Installer 15.9\bin\x86 +echo %PATH% + +call node -e "console.log(require('./package.json').version);" > version.txt +set /p baseVer=