From 84d4b43efc719f0877f2674d33e467b0624eb7aa Mon Sep 17 00:00:00 2001 From: Carina Date: Sat, 11 Jan 2025 15:02:13 +0800 Subject: [PATCH] Update build script for macOS/Linux. --- BuildLinuxPackages.sh | 7 +++++++ BuildMacOSPackages.sh | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/BuildLinuxPackages.sh b/BuildLinuxPackages.sh index 2e67bef6..6522a87d 100755 --- a/BuildLinuxPackages.sh +++ b/BuildLinuxPackages.sh @@ -26,6 +26,13 @@ if [ ! -z "$PREV_VERSION" ]; then fi # Create output directory +if [[ ! -d "./Packages" ]]; then + echo "Create directory 'Packages'" + mkdir ./Packages + if [ "$?" != "0" ]; then + exit + fi +fi if [[ ! -d "./Packages/$VERSION" ]]; then echo "Create directory 'Packages/$VERSION'" mkdir ./Packages/$VERSION diff --git a/BuildMacOSPackages.sh b/BuildMacOSPackages.sh index c7e64e9f..65a87e27 100755 --- a/BuildMacOSPackages.sh +++ b/BuildMacOSPackages.sh @@ -26,6 +26,13 @@ fi echo "Version: $VERSION" # Create output directory +if [[ ! -d "./Packages" ]]; then + echo "Create directory 'Packages'" + mkdir ./Packages + if [ "$?" != "0" ]; then + exit + fi +fi if [[ ! -d "./Packages/$VERSION" ]]; then echo "Create directory 'Packages/$VERSION'" mkdir ./Packages/$VERSION @@ -89,6 +96,7 @@ for i in "${!RID_LIST[@]}"; do echo "Signing $FILE_NAME" codesign -f -o runtime --timestamp --entitlements "./$APP_NAME/$APP_NAME.entitlements" -s "$CERT_NAME" "$FILE_NAME" if [ "$?" != "0" ]; then + echo "Failed to sign $FILE_NAME" exit fi fi