Skip to content

Commit 3fb7f0b

Browse files
author
cw
committed
fix: 使用绝对路径修复 mv 命令错误
1 parent fe45192 commit 3fb7f0b

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/ios-app-store.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,15 @@ jobs:
151151
run: |
152152
echo "🔧 Fixing App.framework Info.plist..."
153153
154-
# Find the IPA file
154+
# Find the IPA file and get absolute path
155155
IPA_FILE=$(find build/ios/ipa -name "*.ipa" | head -n 1)
156-
IPA_DIR=$(dirname "$IPA_FILE")
157-
IPA_NAME=$(basename "$IPA_FILE")
156+
ABS_IPA_FILE=$(cd $(dirname "$IPA_FILE") && pwd)/$(basename "$IPA_FILE")
158157
159158
# Create a temporary directory
160159
TEMP_DIR=$(mktemp -d)
161160
162161
# Unzip the IPA
163-
unzip -q "$IPA_FILE" -d "$TEMP_DIR"
162+
unzip -q "$ABS_IPA_FILE" -d "$TEMP_DIR"
164163
165164
# Fix App.framework Info.plist
166165
APP_PLIST="$TEMP_DIR/Payload/Runner.app/Frameworks/App.framework/Info.plist"
@@ -175,10 +174,10 @@ jobs:
175174
cd "$TEMP_DIR"
176175
NEW_IPA="$TEMP_DIR/fixed.ipa"
177176
zip -qr "$NEW_IPA" Payload
177+
cd -
178178
179179
# Replace the original IPA
180-
mv "$NEW_IPA" "$IPA_FILE"
181-
cd -
180+
mv "$NEW_IPA" "$ABS_IPA_FILE"
182181
183182
# Cleanup
184183
rm -rf "$TEMP_DIR"

0 commit comments

Comments
 (0)