diff --git a/buildscripts/build-local-test-release-config.sh b/buildscripts/build-local-test-release-config.sh new file mode 100755 index 000000000..937cf6b7b --- /dev/null +++ b/buildscripts/build-local-test-release-config.sh @@ -0,0 +1,64 @@ +#!/bin/bash +set -euo pipefail + +# Archives NetNewsWire for Mac, exports it signed with Developer ID (not notarized), and copies it to the Desktop. +# For testing on other Macs: copy via rsync/scp so the app isn't quarantined. +# Note: depends on xcbeautify: + +PROJECT_PATH="NetNewsWire.xcodeproj" +SCHEME_MAC="NetNewsWire" +APP_NAME="NetNewsWire.app" +DESTINATION_APP="$HOME/Desktop/$APP_NAME" + +WORK_DIRECTORY="$(mktemp -d)" +trap 'rm -rf "$WORK_DIRECTORY"' EXIT + +ARCHIVE_PATH="$WORK_DIRECTORY/NetNewsWire.xcarchive" +EXPORT_PATH="$WORK_DIRECTORY/Export" +EXPORT_OPTIONS_PATH="$WORK_DIRECTORY/ExportOptions.plist" + +cd "$(dirname "$0")/.." + +echo "πŸ›  Archiving..." +xcodebuild \ + -project "$PROJECT_PATH" \ + -scheme "$SCHEME_MAC" \ + -configuration Release \ + -destination "generic/platform=macOS" \ + -archivePath "$ARCHIVE_PATH" \ + -allowProvisioningUpdates \ + archive | xcbeautify --quiet + +TEAM_ID="$(/usr/libexec/PlistBuddy -c "Print :ApplicationProperties:Team" "$ARCHIVE_PATH/Info.plist")" + +cat > "$EXPORT_OPTIONS_PATH" < + + + + method + developer-id + destination + export + signingStyle + automatic + teamID + $TEAM_ID + + +EOF + +echo "πŸ“¦ Exporting with Developer ID..." +xcodebuild \ + -exportArchive \ + -archivePath "$ARCHIVE_PATH" \ + -exportPath "$EXPORT_PATH" \ + -exportOptionsPlist "$EXPORT_OPTIONS_PATH" \ + -allowProvisioningUpdates | xcbeautify --quiet + +rm -rf "$DESTINATION_APP" +ditto "$EXPORT_PATH/$APP_NAME" "$DESTINATION_APP" + +codesign --verify --deep --strict "$DESTINATION_APP" +echo "βœ… $DESTINATION_APP" +echo "Copy with: rsync -a --delete \"$DESTINATION_APP\" other-mac.local:Desktop/" diff --git a/buildscripts/copy_to_intel.sh b/buildscripts/copy_to_intel.sh new file mode 100755 index 000000000..29337032f --- /dev/null +++ b/buildscripts/copy_to_intel.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -euo pipefail + +# Copies the app on the Desktop on a local Intel laptop in Brent’s office. +# rsync doesn't add the quarantine flag, so the app launches without notarization. + +REMOTE_HOST="heinlein.local" +SOURCE_APP="$HOME/Desktop/NetNewsWire.app" + +if [ ! -d "$SOURCE_APP" ]; then + echo "❌ $SOURCE_APP not found. Build app first." + exit 1 +fi + +echo "🚚 Copying to $REMOTE_HOST..." +rsync -a --delete "$SOURCE_APP" "$REMOTE_HOST:Desktop/" +echo "βœ… Copied to $REMOTE_HOST:Desktop/NetNewsWire.app"