File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -360,6 +360,14 @@ build_for_arch() {
360360 # ── Step 1: Archive ──
361361 local archive_path=" build/TablePro-${arch} .xcarchive"
362362 echo " 📦 Archiving..."
363+ # Resolve provisioning profile name for archive
364+ local archive_profile_name=" "
365+ local profile_path_for_archive
366+ profile_path_for_archive=$( find ~ /Library/MobileDevice/Provisioning\ Profiles -name " *.provisionprofile" -print -quit 2> /dev/null || true)
367+ if [ -n " ${profile_path_for_archive:- } " ]; then
368+ archive_profile_name=$( /usr/libexec/PlistBuddy -c " Print Name" /dev/stdin <<< " $(security cms -D -i " $profile_path_for_archive " 2>/dev/null)" 2> /dev/null || true)
369+ fi
370+
363371 if ! xcodebuild archive \
364372 -project " $PROJECT " \
365373 -scheme " $SCHEME " \
@@ -370,6 +378,7 @@ build_for_arch() {
370378 CODE_SIGN_IDENTITY=" $SIGN_IDENTITY " \
371379 CODE_SIGN_STYLE=Manual \
372380 DEVELOPMENT_TEAM=" $TEAM_ID " \
381+ ${archive_profile_name: +PROVISIONING_PROFILE_SPECIFIER=" $archive_profile_name " } \
373382 ${ANALYTICS_HMAC_SECRET: +ANALYTICS_HMAC_SECRET=" $ANALYTICS_HMAC_SECRET " } \
374383 -skipPackagePluginValidation \
375384 -clonedSourcePackagesDirPath " $SPM_CACHE_DIR " \
You can’t perform that action at this time.
0 commit comments