From ecfbdf8256568ad59dbeddf167e835211bbf6f4a Mon Sep 17 00:00:00 2001 From: Nguyen Ngoc Minh <91668012+Minh141120@users.noreply.github.com> Date: Mon, 9 Jun 2025 22:20:38 +0700 Subject: [PATCH] chore: build config info plist (#5224) * chore: update Info.plist and tauri config to reflect build channel --- .github/scripts/rename-tauri-app.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/scripts/rename-tauri-app.sh b/.github/scripts/rename-tauri-app.sh index 12a1fadb7..245528d91 100644 --- a/.github/scripts/rename-tauri-app.sh +++ b/.github/scripts/rename-tauri-app.sh @@ -33,6 +33,21 @@ cat ./tauri.conf.json.tmp rm $INPUT_JSON_FILE mv ./tauri.conf.json.tmp $INPUT_JSON_FILE +# Update Info.plist if it exists +INFO_PLIST_PATH="./src-tauri/Info.plist" +if [ -f "$INFO_PLIST_PATH" ]; then + echo "Updating Info.plist..." + + # Replace jan.ai.app with jan-{channel}.ai.app + sed -i '' "s|jan\.ai\.app|jan-${CHANNEL}.ai.app|g" "$INFO_PLIST_PATH" + + # Replace jan with jan-{channel} + sed -i '' "s|jan|jan-${CHANNEL}|g" "$INFO_PLIST_PATH" + + echo "Info.plist updated" + + cat ./src-tauri/Info.plist +fi # Update the layout file # LAYOUT_FILE_PATH="web/app/layout.tsx" @@ -45,4 +60,4 @@ mv ./tauri.conf.json.tmp $INPUT_JSON_FILE # sed -i -e "s#Jan#Jan-$CHANNEL#g" "$LAYOUT_FILE_PATH" # Notify completion -# echo "File has been updated: $LAYOUT_FILE_PATH" +# echo "File has been updated: $LAYOUT_FILE_PATH" \ No newline at end of file