Skip to content

Commit

Permalink
changed tab identifier from command to commandTab
Browse files Browse the repository at this point in the history
  • Loading branch information
BIG-RAT committed May 16, 2024
1 parent 98150c4 commit fc224a1
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 91 deletions.
20 changes: 19 additions & 1 deletion SYM-Helper.xcodeproj/xcshareddata/xcschemes/SYM-Helper.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,30 @@
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "NO">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "newMajor=&quot;$(date -u +%Y%m%d)&quot;&#10;date24H=$(date -u +%H%M)&#10;tmpMinor=$(printf &quot;%x\n&quot; $(echo $date24H | sed &apos;s/^0*//&apos;))&#10;newMinor=$(echo $tmpMinor | tr &apos;[:lower:]&apos; &apos;[:upper:]&apos;)&#10;newBuildNumber=&quot;$newMajor-$newMinor&quot;&#10;&#10;/usr/libexec/PlistBuddy -c &quot;Set :CFBundleVersion $newBuildNumber&quot; &quot;${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Contents/Info.plist&quot;&#10;&#10;## remove extended attributes (from added images)&#10;/usr/bin/xattr -cr &quot;${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Contents/Resources&quot;&#10;&#10;&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B5BBDB9C29A168490040FD71"
BuildableName = "SYM-Helper.app"
BlueprintName = "SYM-Helper"
ReferencedContainer = "container:SYM-Helper.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PreActions>
<PostActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "# notarytool credentials.&#10;# AC_PASSWORD is the name of the keychain item created with `notarytool store-credentials`.&#10;# Grant keychain access to Xcode if prompted by Xcode.&#10;AC_PASSWORD=&quot;nt_password&quot;&#10;&#10;# Do all of the work in a subdirectory of /tmp, and use a&#10;# unique ID so that there&apos;s no collision with previous builds.&#10;##EXPORT_UUID=`uuidgen`&#10;##EXPORT_PATH=&quot;/tmp/$PRODUCT_NAME-$EXPORT_UUID/&quot;&#10;osascript -e &apos;display notification &quot;Starting build process&quot;&apos;&#10;&#10;## create folder to hold exported app&#10;newMajor=&quot;$(date -u +%Y%m%d)&quot;&#10;date24H=$(date -u +%H%M)&#10;tmpMinor=$(printf &quot;%x\n&quot; $(echo $date24H | sed &apos;s/^0*//&apos;))&#10;newMinor=$(echo $tmpMinor | tr &apos;[:lower:]&apos; &apos;[:upper:]&apos;)&#10;newBuildNumber=&quot;$newMajor-$newMinor&quot;&#10;&#10;shortVer=&quot;v${MARKETING_VERSION}&quot;&#10;exeName=&quot;${EXECUTABLE_NAME}&quot;&#10;EXPORT_PATH=&quot;/Users/lesliehelou/Documents/Xcode-Projects/$exeName/$shortVer/$newBuildNumber&quot;&#10;APP_PATH=&quot;$EXPORT_PATH/$PRODUCT_NAME.app&quot;&#10;DMG_PATH=&quot;$EXPORT_PATH/${PRODUCT_NAME}_${shortVer}.dmg&quot;&#10;ZIP_PATH=&quot;$EXPORT_PATH/${PRODUCT_NAME}_${shortVer}.zip&quot;&#10;&#10;if [ ! -d &quot;/Users/lesliehelou/Documents/Xcode-Projects/$exeName/$shortVer/previous&quot; ];then&#10; mkdir -p &quot;/Users/lesliehelou/Documents/Xcode-Projects/$exeName/$shortVer/previous&quot;&#10;fi&#10;VER_PATH=&quot;/Users/lesliehelou/Documents/Xcode-Projects/$exeName/$shortVer&quot;&#10;while read item; do&#10; echo &quot;move $item to &apos;previous&apos; folder&quot;&#10; mv &quot;$VER_PATH/$item&quot; &quot;$VER_PATH/previous/&quot;&#10;done &lt;&lt; EOL &#10;$(ls &quot;/Users/lesliehelou/Documents/Xcode-Projects/$exeName/$shortVer&quot; | grep -v previous)&#10;EOL&#10;&#10;osascript -e &apos;display notification &quot;create export path&quot;&apos;&#10;mkdir -p &quot;$EXPORT_PATH&quot;&#10;&#10;# Xcode doesn&apos;t show run script errors in build log.&#10;exec &gt; &quot;$EXPORT_PATH/Xcode run script.log&quot; 2&gt;&amp;1&#10;open &quot;$EXPORT_PATH/Xcode run script.log&quot;&#10;&#10;# Use osascript(1) to present notification banners; otherwise&#10;# there&apos;s no progress indication until the script finishes.&#10;/usr/bin/osascript -e &apos;display notification &quot;Exporting application archive&#x2026;&quot; with title &quot;Submitting app for notarization&quot;&apos;&#10;&#10;# Ask xcodebuild(1) to export the app. Use the export options&#10;# from a previous manual export that used a Developer ID.&#10;##/usr/bin/xcodebuild -exportArchive -archivePath &quot;$ARCHIVE_PATH&quot; -exportOptionsPlist &quot;$SRCROOT/ExportOptions.plist&quot; -exportPath &quot;$EXPORT_PATH&quot;&#10;/usr/bin/xcodebuild -allowProvisioningUpdates -exportArchive -archivePath &quot;$ARCHIVE_PATH&quot; -exportOptionsPlist &quot;/Users/lesliehelou/Documents/GitHub/ExportOptions.plist&quot; -exportPath &quot;$EXPORT_PATH/&quot;&#10;&#10;osascript -e &apos;display notification &quot;Creating UDIF Disk Image&#x2026;&quot; with title &quot;Submitting app for notarization&quot;&apos;&#10;&#10;# Create a UDIF bzip2-compressed disk image.&#10;cd &quot;$EXPORT_PATH/&quot;&#10;mkdir &quot;$PRODUCT_NAME&quot;&#10;mv -v &quot;$APP_PATH&quot; &quot;$PRODUCT_NAME&quot;&#10;&#10;/usr/bin/hdiutil create -srcfolder &quot;$PRODUCT_NAME&quot; -format UDBZ &quot;$DMG_PATH&quot;&#10;&#10;osascript -e &apos;display notification &quot;Submitting UDIF Disk Image for notarization&#x2026;&quot; with title &quot;Submitting app for notarization&quot;&apos;&#10;&#10;# Submit the finished deliverables for notarization.&#10;# Wait up to 2 hours for a response.&#10;# Use verbose logging in order to file feedback if an error occurs.&#10;## &quot;$DEVELOPER_BIN_DIR/notarytool&quot; submit -p &quot;$AC_PASSWORD&quot; --verbose &quot;$DMG_PATH&quot; --wait --timeout 2h --output-format plist &gt; &quot;NotarizationResponse.plist&quot;&#10;&quot;/Applications/Xcode.app/Contents/Developer/usr/bin/notarytool&quot; submit -p &quot;$AC_PASSWORD&quot; --verbose &quot;$DMG_PATH&quot; --wait --timeout 2h --output-format plist &gt; &quot;NotarizationResponse.plist&quot;&#10;&#10;return_code=$?&#10;&#10;if [ $return_code -eq 0 ]; then&#10; message=`/usr/libexec/PlistBuddy -c &quot;Print :message&quot; &quot;NotarizationResponse.plist&quot;`&#10; status=`/usr/libexec/PlistBuddy -c &quot;Print :status&quot; &quot;NotarizationResponse.plist&quot;`&#10;else&#10; message=&quot;An Error Occurred.&quot;&#10; status=&quot;Check Xcode log.&quot;&#10;## open &quot;$EXPORT_PATH/Xcode run script.log&quot;&#10;fi&#10;&#10;# Show and speak the final status.&#10;osascript -e &quot;on run(argv)&quot; \&#10;-e &apos;display notification item 1 of argv &amp; &quot; : &quot; &amp; item 2 of argv with title &quot;Submitting app for notarization&quot; sound name &quot;Crystal&quot;&apos; \&#10;-e &apos;set text item delimiters to &quot;, &quot;&apos; \&#10;-e &quot;set args to argv as text&quot; \&#10;-e &quot;say args&quot; \&#10;-e &quot;delay 5&quot; \&#10;-e &quot;end&quot; \&#10;-- &quot;$message&quot; &quot;$status&quot;&#10;&#10;wait 5&#10;xcrun stapler staple &quot;$PRODUCT_NAME/$PRODUCT_NAME.app&quot;&#10;xcrun stapler staple &quot;${PRODUCT_NAME}_${shortVer}.dmg&quot;&#10;&#10;if [ -e &quot;$ZIP_PATH&quot; ];then&#10; rm -f &quot;$ZIP_PATH&quot;&#10;fi&#10;/usr/bin/ditto -c -k --keepParent &quot;$PRODUCT_NAME/$PRODUCT_NAME.app&quot; &quot;$ZIP_PATH&quot;&#10;&#10;# Open the folder that was created, which also signals completion.&#10;open &quot;$EXPORT_PATH&quot;&#10;&#10;&#10;&#10;&#10;&#10;">
scriptText = "# notarytool credentials.&#10;# AC_PASSWORD is the name of the keychain item created with `notarytool store-credentials`.&#10;# Grant keychain access to Xcode if prompted by Xcode.&#10;AC_PASSWORD=&quot;nt_password&quot;&#10;currentUser=$(stat -f%Su /dev/console)&#10;&#10;# Do all of the work in a subdirectory of /tmp, and use a&#10;# unique ID so that there&apos;s no collision with previous builds.&#10;##EXPORT_UUID=`uuidgen`&#10;##EXPORT_PATH=&quot;/tmp/$PRODUCT_NAME-$EXPORT_UUID/&quot;&#10;osascript -e &apos;display notification &quot;Starting build process&quot;&apos;&#10;&#10;## create folder to hold exported app&#10;newMajor=&quot;$(date -u +%Y%m%d)&quot;&#10;date24H=$(date -u +%H%M)&#10;tmpMinor=$(printf &quot;%x\n&quot; $(echo $date24H | sed &apos;s/^0*//&apos;))&#10;newMinor=$(echo $tmpMinor | tr &apos;[:lower:]&apos; &apos;[:upper:]&apos;)&#10;newBuildNumber=&quot;$newMajor-$newMinor&quot;&#10;&#10;shortVer=&quot;v${MARKETING_VERSION}&quot;&#10;exeName=&quot;${EXECUTABLE_NAME}&quot;&#10;EXPORT_PATH=&quot;/Users/$currentUser/Documents/Xcode-Projects/$exeName/$shortVer/$newBuildNumber&quot;&#10;APP_PATH=&quot;$EXPORT_PATH/$PRODUCT_NAME.app&quot;&#10;DMG_PATH=&quot;$EXPORT_PATH/${PRODUCT_NAME}_${shortVer}.dmg&quot;&#10;ZIP_PATH=&quot;$EXPORT_PATH/${PRODUCT_NAME}_${shortVer}.zip&quot;&#10;&#10;osascript -e &apos;display notification &quot;create export path&quot;&apos;&#10;mkdir -p &quot;$EXPORT_PATH&quot;&#10;&#10;# Xcode doesn&apos;t show run script errors in build log.&#10;exec &gt; &quot;$EXPORT_PATH/Xcode run script.log&quot; 2&gt;&amp;1&#10;open &quot;$EXPORT_PATH/Xcode run script.log&quot;&#10;&#10;# Use osascript(1) to present notification banners; otherwise&#10;# there&apos;s no progress indication until the script finishes.&#10;/usr/bin/osascript -e &apos;display notification &quot;Exporting application archive&#x2026;&quot; with title &quot;Submitting app for notarization&quot;&apos;&#10;&#10;# Ask xcodebuild(1) to export the app. Use the export options&#10;# from a previous manual export that used a Developer ID.&#10;##/usr/bin/xcodebuild -exportArchive -archivePath &quot;$ARCHIVE_PATH&quot; -exportOptionsPlist &quot;$SRCROOT/ExportOptions.plist&quot; -exportPath &quot;$EXPORT_PATH&quot;&#10;/usr/bin/xcodebuild -allowProvisioningUpdates -exportArchive -archivePath &quot;$ARCHIVE_PATH&quot; -exportOptionsPlist &quot;/Users/$currentUser/Documents/GitHub/ExportOptions.plist&quot; -exportPath &quot;$EXPORT_PATH/&quot;&#10;&#10;osascript -e &apos;display notification &quot;Creating UDIF Disk Image&#x2026;&quot; with title &quot;Submitting app for notarization&quot;&apos;&#10;&#10;# Create a UDIF bzip2-compressed disk image.&#10;cd &quot;$EXPORT_PATH/&quot;&#10;mkdir &quot;$PRODUCT_NAME&quot;&#10;mv -v &quot;$APP_PATH&quot; &quot;$PRODUCT_NAME&quot;&#10;&#10;/usr/bin/hdiutil create -srcfolder &quot;$PRODUCT_NAME&quot; -format UDBZ &quot;$DMG_PATH&quot;&#10;&#10;osascript -e &apos;display notification &quot;Submitting UDIF Disk Image for notarization&#x2026;&quot; with title &quot;Submitting app for notarization&quot;&apos;&#10;&#10;# Submit the finished deliverables for notarization.&#10;# Wait up to 2 hours for a response.&#10;# Use verbose logging in order to file feedback if an error occurs.&#10;## &quot;$DEVELOPER_BIN_DIR/notarytool&quot; submit -p &quot;$AC_PASSWORD&quot; --verbose &quot;$DMG_PATH&quot; --wait --timeout 2h --output-format plist &gt; &quot;NotarizationResponse.plist&quot;&#10;&quot;/Applications/Xcode.app/Contents/Developer/usr/bin/notarytool&quot; submit -p &quot;$AC_PASSWORD&quot; --verbose &quot;$DMG_PATH&quot; --wait --timeout 2h --output-format plist &gt; &quot;NotarizationResponse.plist&quot;&#10;&#10;return_code=$?&#10;&#10;if [ $return_code -eq 0 ]; then&#10; message=`/usr/libexec/PlistBuddy -c &quot;Print :message&quot; &quot;NotarizationResponse.plist&quot;`&#10; status=`/usr/libexec/PlistBuddy -c &quot;Print :status&quot; &quot;NotarizationResponse.plist&quot;`&#10;else&#10; message=&quot;An Error Occurred.&quot;&#10; status=&quot;Check Xcode log.&quot;&#10;## open &quot;$EXPORT_PATH/Xcode run script.log&quot;&#10;fi&#10;&#10;# Show and speak the final status.&#10;osascript -e &quot;on run(argv)&quot; \&#10;-e &apos;display notification item 1 of argv &amp; &quot; : &quot; &amp; item 2 of argv with title &quot;Submitting app for notarization&quot; sound name &quot;Crystal&quot;&apos; \&#10;-e &apos;set text item delimiters to &quot;, &quot;&apos; \&#10;-e &quot;set args to argv as text&quot; \&#10;-e &quot;say args&quot; \&#10;-e &quot;delay 5&quot; \&#10;-e &quot;end&quot; \&#10;-- &quot;$message&quot; &quot;$status&quot;&#10;&#10;wait 5&#10;xcrun stapler staple &quot;$PRODUCT_NAME/$PRODUCT_NAME.app&quot;&#10;xcrun stapler staple &quot;${PRODUCT_NAME}_${shortVer}.dmg&quot;&#10;&#10;if [ -e &quot;$ZIP_PATH&quot; ];then&#10; rm -f &quot;$ZIP_PATH&quot;&#10;fi&#10;/usr/bin/ditto -c -k --keepParent &quot;$PRODUCT_NAME/$PRODUCT_NAME.app&quot; &quot;$ZIP_PATH&quot;&#10;&#10;# Open the folder that was created, which also signals completion.&#10;open &quot;$EXPORT_PATH&quot;&#10;&#10;&#10;&#10;&#10;&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
Expand Down
Loading

0 comments on commit fc224a1

Please sign in to comment.