Updates to scanner with CVE saving and auto update
This commit is contained in:
+33
-11
@@ -4,9 +4,10 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
command -v xcodebuild >/dev/null || { echo "Xcode is required" >&2; exit 1; }
|
||||
command -v hdiutil >/dev/null || { echo "hdiutil missing" >&2; exit 1; }
|
||||
IDENTITY="${SIGNING_IDENTITY:-$(security find-identity -v -p codesigning | sed -nE 's/.*"(Developer ID Application: [^"]+)".*/\1/p' | head -1)}"
|
||||
# Use the certificate fingerprint to avoid ambiguous Keychain identities.
|
||||
IDENTITY="${SIGNING_IDENTITY:-$(security find-identity -v -p codesigning | awk '/Developer ID Application:/ {print $2; exit}')}"
|
||||
[[ -n "$IDENTITY" ]] || { echo "Developer ID Application signing identity required. Set SIGNING_IDENTITY." >&2; exit 1; }
|
||||
PROFILE="${NOTARY_PROFILE:-}"
|
||||
PROFILE="${NOTARY_PROFILE:-orion-notary}"
|
||||
[[ -n "$PROFILE" ]] || { echo "Set NOTARY_PROFILE to an existing notarytool keychain profile." >&2; exit 1; }
|
||||
DERIVED="$ROOT/.build"
|
||||
xcodebuild -project "$ROOT/PHPGuard.xcodeproj" -scheme PHPGuard -configuration Release -derivedDataPath "$DERIVED" CODE_SIGNING_ALLOWED=NO build
|
||||
@@ -15,19 +16,40 @@ APP="$DERIVED/Build/Products/Release/PHPGuard.app"
|
||||
|
||||
echo "=== VERIFY APPLICATION ICON ==="
|
||||
|
||||
APP_ICON_NAME=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIconFile" "$APP/Contents/Info.plist" 2>/dev/null || true)
|
||||
ASSET_CATALOG="$APP/Contents/Resources/Assets.car"
|
||||
|
||||
if [[ -z "$APP_ICON_NAME" ]]; then
|
||||
echo "ERROR: Application icon is missing from Info.plist" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Application icon: $APP_ICON_NAME"
|
||||
|
||||
if [[ ! -f "$APP/Contents/Resources/Assets.car" ]]; then
|
||||
if [[ ! -f "$ASSET_CATALOG" ]]; then
|
||||
echo "ERROR: Compiled asset catalog missing" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
APP_ICON_NAME=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIconName" "$APP/Contents/Info.plist" 2>/dev/null || true)
|
||||
|
||||
APP_ICON_FILE=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIconFile" "$APP/Contents/Info.plist" 2>/dev/null || true)
|
||||
|
||||
if [[ -n "$APP_ICON_NAME" ]]; then
|
||||
echo "Application icon asset: $APP_ICON_NAME"
|
||||
elif [[ -n "$APP_ICON_FILE" ]]; then
|
||||
echo "Application icon file: $APP_ICON_FILE"
|
||||
else
|
||||
echo "WARNING: No application icon key in Info.plist."
|
||||
echo "Checking Xcode asset catalog configuration..."
|
||||
|
||||
ICON_SETTING=$(xcodebuild -project "$ROOT/PHPGuard.xcodeproj" -scheme PHPGuard -configuration Release -showBuildSettings 2>/dev/null |
|
||||
sed -n 's/^[[:space:]]*ASSETCATALOG_COMPILER_APPICON_NAME = //p' |
|
||||
head -1)
|
||||
|
||||
if [[ -z "$ICON_SETTING" ]]; then
|
||||
echo "ERROR: No application icon configured in Xcode." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Configured icon asset: $ICON_SETTING"
|
||||
fi
|
||||
|
||||
echo "Compiled asset catalog present."
|
||||
echo "Application icon configuration verified."
|
||||
|
||||
VERSION="$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' "$APP/Contents/Info.plist")"
|
||||
mkdir -p "$ROOT/dist"
|
||||
STAGING="$(mktemp -d)"
|
||||
|
||||
Reference in New Issue
Block a user