From 802da6e9d13df5ec3000b39762d2d95abec6c642 Mon Sep 17 00:00:00 2001 From: mrhid6 Date: Wed, 7 Dec 2022 14:03:47 +0000 Subject: [PATCH] ci: Fixes to scripts --- tools/package/ci_compile_linux.sh | 12 ++++++++++++ tools/package/ci_compile_windows.sh | 16 ++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/tools/package/ci_compile_linux.sh b/tools/package/ci_compile_linux.sh index 1344ec5..af157b0 100644 --- a/tools/package/ci_compile_linux.sh +++ b/tools/package/ci_compile_linux.sh @@ -44,6 +44,8 @@ while read -r line; do done <${release_dir_linux}/exe.list rm ${release_dir_linux}/exe.list +echo -en "\e[32m✔\e[0m\n" + printDots "* Compiling Linux" 30 pkg app.js -c package.json -t node18-linux-x64 --out-path ${release_dir_linux} -d >${release_dir_linux}/build.log @@ -58,4 +60,14 @@ fi ZipLinuxFileName="${release_dir}/SSM-Linux-x64-${VERSION}.tar.gz" cd ${release_dir_linux} +printDots "* Zipping Linux Binaries" 30 + tar cz --exclude='*.log' -f ${ZipLinuxFileName} ./* >/dev/null +if [ $? -ne 0 ]; then + echo -en "\e[31m✘\e[0m\n" + exit 1 +else + echo -en "\e[32m✔\e[0m\n" +fi + + diff --git a/tools/package/ci_compile_windows.sh b/tools/package/ci_compile_windows.sh index 2c305ab..9e13c37 100644 --- a/tools/package/ci_compile_windows.sh +++ b/tools/package/ci_compile_windows.sh @@ -68,10 +68,22 @@ echo -en "\e[32m✔\e[0m\n" printDots "* Compiling Win64" 30 pkg app.js -c package.json -t node18-win-x64 --out-path ${release_dir_win64} -d >${release_dir_win64}/build.log -echo -en "\e[32m✔\e[0m\n" +if [ $? -ne 0 ]; then + echo -en "\e[31m✘\e[0m\n" + exit 1 +else + echo -en "\e[32m✔\e[0m\n" +fi ZipWin64FileName="${release_dir}/SSM-Win-x64-${VERSION}.zip" cd ${release_dir_win64} +printDots "* Zipping Windows Binaries" 30 /c/BuildScripts/7z.exe a -tzip ${ZipWin64FileName} ./* -xr!build.log >/dev/null -echo -en "\e[32m✔\e[0m\n" + +if [ $? -ne 0 ]; then + echo -en "\e[31m✘\e[0m\n" + exit 1 +else + echo -en "\e[32m✔\e[0m\n" +fi