gowalk-cicd 1.0.24 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/action/.daemux-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.25
|
|
@@ -101,8 +101,22 @@ def _entitlements_from_configs(
|
|
|
101
101
|
resolve exactly, and then only accepted when the resulting file is really
|
|
102
102
|
there — a missed entitlements file costs a clearer error, a wrong one costs
|
|
103
103
|
a wrong App ID edit.
|
|
104
|
+
|
|
105
|
+
Only the ARCHIVE configuration counts: CI archives Release, so its
|
|
106
|
+
CODE_SIGN_ENTITLEMENTS (falling back to Profile, then to every config
|
|
107
|
+
only when neither exists) decides provisioning. An entitlement wired
|
|
108
|
+
into Debug alone — the standard way to simulator-test an Apple-granted
|
|
109
|
+
capability (CarPlay) before the grant lands — must NOT force that
|
|
110
|
+
capability onto the App ID for the archive.
|
|
104
111
|
"""
|
|
105
|
-
|
|
112
|
+
by_name = {
|
|
113
|
+
((objects.get(cid) or {}).get("name") or "").lower(): cid
|
|
114
|
+
for cid in config_ids
|
|
115
|
+
}
|
|
116
|
+
archive_cid = by_name.get("release") or by_name.get("profile")
|
|
117
|
+
candidates = [archive_cid] if archive_cid else config_ids
|
|
118
|
+
|
|
119
|
+
for cid in candidates:
|
|
106
120
|
cfg = objects.get(cid) or {}
|
|
107
121
|
settings = cfg.get("buildSettings") or {}
|
|
108
122
|
value = (settings.get("CODE_SIGN_ENTITLEMENTS") or "").strip().strip('"')
|
|
@@ -76,5 +76,78 @@ class EntitlementsFromConfigsTest(unittest.TestCase):
|
|
|
76
76
|
_entitlements_from_configs({"cfg": {"buildSettings": {}}}, ["cfg"]), "")
|
|
77
77
|
|
|
78
78
|
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class ReleaseConfigPriorityTest(unittest.TestCase):
|
|
82
|
+
"""Release must drive provisioning: an entitlement wired into Debug only
|
|
83
|
+
(the pre-grant CarPlay simulator-testing setup) must not require the
|
|
84
|
+
capability on the App ID for the Release archive."""
|
|
85
|
+
|
|
86
|
+
def _objects(self):
|
|
87
|
+
return {
|
|
88
|
+
"dbg": {
|
|
89
|
+
"name": "Debug",
|
|
90
|
+
"buildSettings": {"CODE_SIGN_ENTITLEMENTS": "App/Debug.entitlements"},
|
|
91
|
+
},
|
|
92
|
+
"rel": {"name": "Release", "buildSettings": {}},
|
|
93
|
+
"prof": {"name": "Profile", "buildSettings": {}},
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
def test_debug_only_entitlements_are_invisible_when_release_has_none(self):
|
|
97
|
+
# The pre-grant CarPlay setup: entitlements wired into Debug for the
|
|
98
|
+
# simulator, Release deliberately unwired so the archive needs no
|
|
99
|
+
# Apple-granted capability. The archive config decides — result "".
|
|
100
|
+
objects = self._objects()
|
|
101
|
+
self.assertEqual(
|
|
102
|
+
_entitlements_from_configs(
|
|
103
|
+
objects, ["dbg", "rel", "prof"], target_name="App",
|
|
104
|
+
base=Path("/nonexistent")),
|
|
105
|
+
"",
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
def test_all_configs_scanned_when_no_release_or_profile_exists(self):
|
|
109
|
+
objects = {
|
|
110
|
+
"a": {"name": "Staging", "buildSettings": {}},
|
|
111
|
+
"b": {
|
|
112
|
+
"name": "Custom",
|
|
113
|
+
"buildSettings": {"CODE_SIGN_ENTITLEMENTS": "App/App.entitlements"},
|
|
114
|
+
},
|
|
115
|
+
}
|
|
116
|
+
self.assertEqual(
|
|
117
|
+
_entitlements_from_configs(
|
|
118
|
+
objects, ["a", "b"], target_name="App", base=Path("/nonexistent")),
|
|
119
|
+
"App/App.entitlements",
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
def test_release_wins_over_debug_regardless_of_order(self):
|
|
123
|
+
objects = self._objects()
|
|
124
|
+
objects["rel"]["buildSettings"]["CODE_SIGN_ENTITLEMENTS"] = (
|
|
125
|
+
"App/Release.entitlements")
|
|
126
|
+
for order in (["dbg", "rel", "prof"], ["rel", "dbg", "prof"]):
|
|
127
|
+
self.assertEqual(
|
|
128
|
+
_entitlements_from_configs(
|
|
129
|
+
objects, order, target_name="App", base=Path("/nonexistent")),
|
|
130
|
+
"App/Release.entitlements",
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
def test_profile_is_the_archive_config_when_release_does_not_exist(self):
|
|
134
|
+
objects = {
|
|
135
|
+
"dbg": {
|
|
136
|
+
"name": "Debug",
|
|
137
|
+
"buildSettings": {"CODE_SIGN_ENTITLEMENTS": "App/Debug.entitlements"},
|
|
138
|
+
},
|
|
139
|
+
"prof": {
|
|
140
|
+
"name": "Profile",
|
|
141
|
+
"buildSettings": {"CODE_SIGN_ENTITLEMENTS": "App/Profile.entitlements"},
|
|
142
|
+
},
|
|
143
|
+
}
|
|
144
|
+
self.assertEqual(
|
|
145
|
+
_entitlements_from_configs(
|
|
146
|
+
objects, ["dbg", "prof"], target_name="App",
|
|
147
|
+
base=Path("/nonexistent")),
|
|
148
|
+
"App/Profile.entitlements",
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
|
|
79
152
|
if __name__ == "__main__":
|
|
80
153
|
unittest.main()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.25
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.25
|