From e368076cac14347f5760cd8f082fdeaa9fbc3c47 Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Wed, 14 May 2025 09:45:00 +0800 Subject: [PATCH] chore: update bundleVersion for macOS AppStore build (#1146) --- .../scripts/release-mac-appstore.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/apps/readest-app/scripts/release-mac-appstore.sh b/apps/readest-app/scripts/release-mac-appstore.sh index fc08c8b3..e386a168 100644 --- a/apps/readest-app/scripts/release-mac-appstore.sh +++ b/apps/readest-app/scripts/release-mac-appstore.sh @@ -1,3 +1,22 @@ +#!/bin/bash +set -e + +echo "Updating bundleVersion in tauri.appstore.conf.json..." + +CONFIG_FILE="src-tauri/tauri.appstore.conf.json" +CURRENT_DATE=$(date "+%Y%m%d.%H%M%S") + +if [ ! -f "$CONFIG_FILE" ]; then + echo "Error: Config file $CONFIG_FILE not found!" + exit 1 +fi + +TMP_FILE=$(mktemp) +cat "$CONFIG_FILE" | jq --arg version "$CURRENT_DATE" '.bundle.macOS.bundleVersion = $version' > "$TMP_FILE" +mv "$TMP_FILE" "$CONFIG_FILE" +echo "Updated bundleVersion to $CURRENT_DATE" + +echo "Building macOS universal app for App Store..." pnpm run build-macos-universial-appstore BUNDLE_DIR=../../target/universal-apple-darwin/release/bundle/macos