ai/at
1
0

fix build option pkg version

This commit is contained in:
2025-12-13 14:06:46 +09:00
parent aabe3b0302
commit bcd21bdfec
2 changed files with 31 additions and 0 deletions

View File

@@ -41,6 +41,22 @@ else
fi
function cleanup_build {
# 1.8. Update package.json version (prevent App Store version conflict)
echo "1.8. Updating package.json version..."
if [ -n "$APP_VERSION" ]; then
PACKAGE_JSON="$REPO_DIR/package.json"
# Use node to update version in package.json
node -e "
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('$PACKAGE_JSON', 'utf8'));
pkg.version = '$APP_VERSION';
fs.writeFileSync('$PACKAGE_JSON', JSON.stringify(pkg, null, 2) + '\n');
"
echo " ✅ Set version to $APP_VERSION"
else
echo " ⚠️ APP_VERSION not set in .env"
fi
# 2. Prebuild (Generate ios directory)
echo "2. Running Expo Prebuild..."
# Clean old ios folder to remove old entitlements/AppClip targets