-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.yml
More file actions
78 lines (70 loc) · 2.58 KB
/
Copy pathproject.yml
File metadata and controls
78 lines (70 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CloseAll
options:
bundleIdPrefix: com.closeall
deploymentTarget:
macOS: "12.0"
xcodeVersion: "15.0"
generateEmptyDirectories: true
settings:
base:
PRODUCT_NAME: CloseAll
MARKETING_VERSION: "1.10.2"
CURRENT_PROJECT_VERSION: "1"
SWIFT_VERSION: "5.9"
MACOSX_DEPLOYMENT_TARGET: "12.0"
CODE_SIGN_IDENTITY: "-"
CODE_SIGNING_REQUIRED: "NO"
CODE_SIGN_ENTITLEMENTS: ""
ENABLE_DEBUG_DYLIB: "NO"
ARCHS: "arm64"
EXCLUDED_ARCHS: ""
targets:
CloseAll:
type: application
platform: macOS
sources:
- path: Sources
type: group
resources:
- path: Resources
type: group
settings:
base:
INFOPLIST_FILE: Resources/Info.plist
INFOPLIST_KEY_CFBundleIconFile: AppIcon.icns
PRODUCT_BUNDLE_IDENTIFIER: com.closeall.app2
LD_RUNPATH_SEARCH_PATHS: "@executable_path/../Frameworks"
ENABLE_HARDENED_RUNTIME: NO
CODE_SIGN_ENTITLEMENTS: ""
REGISTER_WITH_LAUNCH_SERVICES: "NO"
postBuildScripts:
- name: "Copy to Applications"
script: |
if [ -d "$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app" ]; then
APP_NAME="$PRODUCT_NAME.app"
LSREGISTER="/System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/LaunchServices.framework/Versions/Current/Support/lsregister"
# Unregister any previous copies to prevent Launchpad duplicates
"$LSREGISTER" -u /Applications/"$APP_NAME" 2>/dev/null || true
"$LSREGISTER" -u "$HOME"/Applications/"$APP_NAME" 2>/dev/null || true
rm -rf /Applications/"$APP_NAME"
rm -rf "$HOME"/Applications/"$APP_NAME"
cp -R "$BUILT_PRODUCTS_DIR/$APP_NAME" /Applications/
codesign --force --deep --sign - /Applications/"$APP_NAME"
"$LSREGISTER" -f -R -trusted /Applications/"$APP_NAME"
echo "✓ Updated /Applications/$APP_NAME"
fi
runOnlyForDebugBuilds: true
schemes:
CloseAll:
build:
targets:
CloseAll: all
postActions:
- name: "Register with Launch Services"
settingsTarget: CloseAll
script: |
APP_NAME="CloseAll.app"
LSREGISTER="/System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/LaunchServices.framework/Versions/Current/Support/lsregister"
"$LSREGISTER" -u /Applications/"$APP_NAME" 2>/dev/null || true
"$LSREGISTER" -u "$HOME"/Applications/"$APP_NAME" 2>/dev/null || true
"$LSREGISTER" -f -R -trusted /Applications/"$APP_NAME" 2>/dev/null || true