Repository navigation
Expand file tree
/
Copy pathproject.yml
More file actions
127 lines (122 loc) · 5.28 KB
/
Copy pathproject.yml
File metadata and controls
127 lines (122 loc) · 5.28 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: PassQuickAccess
options:
bundleIdPrefix: it.ramin
deploymentTarget:
macOS: "14.0"
createIntermediateGroups: true
packages:
KeyboardShortcuts:
url: https://github.com/sindresorhus/KeyboardShortcuts
from: "2.0.0"
Sparkle:
url: https://github.com/sparkle-project/Sparkle
# Pinned to an exact version (supply chain): a new Sparkle release is taken
# only after a deliberate bump here, never resolved automatically.
exactVersion: "2.9.3"
settings:
base:
SWIFT_VERSION: "5.0"
MARKETING_VERSION: "1.3.1"
CURRENT_PROJECT_VERSION: "1"
SWIFT_STRICT_CONCURRENCY: complete
GCC_TREAT_WARNINGS_AS_ERRORS: YES
SWIFT_TREAT_WARNINGS_AS_ERRORS: YES
targets:
PassQuickAccess:
type: application
platform: macOS
sources:
- path: Sources/PassQuickAccess
dependencies:
- package: KeyboardShortcuts
- package: Sparkle
# Rides along in Contents/PlugIns, which is where macOS looks for an app's
# extensions. Spelled out rather than left to xcodegen's default so a
# change in that default can't silently move it somewhere unusable.
- target: PassQuickAccessAutoFill
embed: true
copy:
destination: plugins
# Signing lives in Config/Signing.xcconfig (ad-hoc by default), which pulls
# in a git-ignored Config/Local.xcconfig if you want to sign with your own
# identity.
configFiles:
Debug: Config/Signing.xcconfig
Release: Config/Signing.xcconfig
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: it.ramin.PassQuickAccess
INFOPLIST_FILE: Sources/PassQuickAccess/App/Info.plist
# The suffix picks the entitlements variant: empty by default, and set to
# "-Distribution" by scripts/build-release.sh for a Developer ID build.
# It is done with a variable rather than by overriding the whole path on
# the xcodebuild command line, because a command-line setting reaches
# every target including the SPM packages, which would then look for the
# file inside their own checkout and fail the build.
CODE_SIGN_ENTITLEMENTS: Sources/PassQuickAccess/App/PassQuickAccess$(PQA_ENTITLEMENTS_SUFFIX).entitlements
# The AutoFill entitlement is allowlisted by a provisioning profile, so
# a signed build needs one embedded. Named through a variable for the
# same reason as the entitlements above: a PROVISIONING_PROFILE_SPECIFIER
# on the xcodebuild command line would reach the SPM package targets,
# which would then look for a profile for a bundle id they don't own.
# Empty everywhere else, which is what an unsigned build wants.
PROVISIONING_PROFILE_SPECIFIER: $(PQA_APP_PROFILE)
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
# The app launches a subprocess (pass-cli), which the App Sandbox
# forbids, so it is unsandboxed.
ENABLE_APP_SANDBOX: NO
configs:
# The hardened runtime is needed only for notarized distribution, and it
# blocks XCTest's library injection, so enable it for Release only.
Debug:
ENABLE_HARDENED_RUNTIME: NO
Release:
ENABLE_HARDENED_RUNTIME: YES
# Keep get-task-allow out of signed Release builds, so the hardened
# runtime actually prevents another process from attaching.
CODE_SIGN_INJECT_BASE_ENTITLEMENTS: NO
# The credential provider macOS loads when an app asks for a password. Unlike
# the app it *is* sandboxed, because the system refuses to load an extension
# that isn't; that is also why it can't run pass-cli and has to ask the app.
PassQuickAccessAutoFill:
type: app-extension
platform: macOS
sources:
- path: Sources/PassQuickAccessAutoFill
# The protocol both ends speak, plus the two pieces of socket plumbing it
# is built on. Compiled into each target rather than factored into a shared
# framework: an embedded framework would need the by-hand re-signing the
# release script already does for Sparkle, and would have to satisfy
# library validation, which is a lot of machinery for a handful of value
# types and two files of POSIX calls.
- path: Sources/PassQuickAccess/AutoFill/Shared
- path: Sources/PassQuickAccess/SSH/UnixSocket.swift
- path: Sources/PassQuickAccess/SSH/CodeSignatureCheck.swift
configFiles:
Debug: Config/Signing.xcconfig
Release: Config/Signing.xcconfig
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: it.ramin.PassQuickAccess.AutoFill
INFOPLIST_FILE: Sources/PassQuickAccessAutoFill/Info.plist
CODE_SIGN_ENTITLEMENTS: Sources/PassQuickAccessAutoFill/PassQuickAccessAutoFill$(PQA_ENTITLEMENTS_SUFFIX).entitlements
PROVISIONING_PROFILE_SPECIFIER: $(PQA_AUTOFILL_PROFILE)
ENABLE_APP_SANDBOX: YES
SKIP_INSTALL: YES
configs:
Debug:
ENABLE_HARDENED_RUNTIME: NO
Release:
ENABLE_HARDENED_RUNTIME: YES
CODE_SIGN_INJECT_BASE_ENTITLEMENTS: NO
PassQuickAccessTests:
type: bundle.unit-test
platform: macOS
sources:
- path: Tests/PassQuickAccessTests
dependencies:
- target: PassQuickAccess
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: it.ramin.PassQuickAccessTests
GENERATE_INFOPLIST_FILE: YES