@supersdk/supercli 0.3.3 → 0.3.5-staging.52
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/dist/build/artifactIntegrity.js +158 -2
- package/dist/build/artifactIntegrity.js.map +1 -1
- package/dist/build/projectBuild.js +335 -0
- package/dist/build/projectBuild.js.map +1 -0
- package/dist/cli.js +0 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/add.js +35 -29
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/build.js +407 -105
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/init.js +22 -29
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/register.js +62 -217
- package/dist/commands/register.js.map +1 -1
- package/dist/config/appConfig.js +36 -163
- package/dist/config/appConfig.js.map +1 -1
- package/dist/config/superConfig.js +213 -185
- package/dist/config/superConfig.js.map +1 -1
- package/dist/deploy/domainEndpoints.js +142 -0
- package/dist/deploy/domainEndpoints.js.map +1 -0
- package/dist/deploy/manifest.js +189 -167
- package/dist/deploy/manifest.js.map +1 -1
- package/dist/deploy/preflight.js +15 -16
- package/dist/deploy/preflight.js.map +1 -1
- package/dist/deploy/resultWriter.js +95 -9
- package/dist/deploy/resultWriter.js.map +1 -1
- package/dist/deploy/runAdapter.js +79 -10
- package/dist/deploy/runAdapter.js.map +1 -1
- package/dist/deploy/siteAdapter.js +54 -8
- package/dist/deploy/siteAdapter.js.map +1 -1
- package/dist/docker/dockerCli.js +72 -77
- package/dist/docker/dockerCli.js.map +1 -1
- package/dist/publish/runClient.js +4 -0
- package/dist/publish/runClient.js.map +1 -1
- package/dist/template/README.md +26 -94
- package/dist/template/android/gradle/supersdk-config-reader.gradle +13 -62
- package/dist/template/android/scripts/build.sh +11 -0
- package/dist/template/ios/project.yml +1 -1
- package/dist/template/ios/scripts/build.sh +19 -0
- package/dist/template/ios/scripts/render_project.py +60 -0
- package/dist/template/ios/supersdk-default.config.json +6 -0
- package/dist/template/service/scripts/build.sh +11 -0
- package/dist/template/super.json +22 -14
- package/dist/template/template_manifest.json +3 -7
- package/dist/template/web/package.json +8 -0
- package/dist/template/web/scripts/build.sh +8 -0
- package/dist/template/web/scripts/web_package.py +490 -0
- package/dist/template/web/src/js/app.js +2 -2
- package/dist/util/shell.js +3 -3
- package/dist/workspace/config.js +3 -79
- package/dist/workspace/config.js.map +1 -1
- package/dist/workspace/identity.js +6 -15
- package/dist/workspace/identity.js.map +1 -1
- package/dist/workspace/projectIdentity.js +2 -7
- package/dist/workspace/projectIdentity.js.map +1 -1
- package/dist/workspace/template.js +205 -77
- package/dist/workspace/template.js.map +1 -1
- package/package.json +4 -1
- package/dist/commands/config.js +0 -170
- package/dist/commands/config.js.map +0 -1
- package/dist/template/scripts/android_snapshot_canary.py +0 -145
- package/dist/template/scripts/build_android.sh +0 -382
- package/dist/template/scripts/build_ios.sh +0 -331
- package/dist/template/scripts/build_service.sh +0 -89
- package/dist/template/scripts/build_site.sh +0 -57
- package/dist/template/scripts/lib/workspace.sh +0 -43
- package/dist/template/scripts/serve_web.py +0 -78
- package/dist/template/scripts/super_build_orchestrator.py +0 -344
- package/dist/template/scripts/supersdk_template.py +0 -1394
- package/dist/template/scripts/web_host_validator.py +0 -103
- package/dist/template/scripts/web_package.py +0 -296
- package/dist/template/scripts/ws03_shared_schema_merge_guard.py +0 -73
- package/dist/template/super_build.sh +0 -70
- package/dist/workspace/inspect.js +0 -275
- package/dist/workspace/inspect.js.map +0 -1
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Fixed-adapter workspace builder and portable manifest authority."""
|
|
3
|
-
|
|
4
|
-
import argparse
|
|
5
|
-
import hashlib
|
|
6
|
-
import json
|
|
7
|
-
import math
|
|
8
|
-
import os
|
|
9
|
-
import signal
|
|
10
|
-
import stat
|
|
11
|
-
import subprocess
|
|
12
|
-
import sys
|
|
13
|
-
import threading
|
|
14
|
-
import uuid
|
|
15
|
-
from datetime import datetime, timezone
|
|
16
|
-
from pathlib import Path
|
|
17
|
-
|
|
18
|
-
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
19
|
-
import supersdk_template
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
SUMMARY_PREFIX = "SUPERSDK_BUILD_SUMMARY_JSON="
|
|
23
|
-
MANIFEST_FILENAME = "super-build-manifest.json"
|
|
24
|
-
MANIFEST_SCHEMA_VERSION = 1
|
|
25
|
-
DEFAULT_TIMEOUT_SECONDS = 1800.0
|
|
26
|
-
REASON_LIMIT = 500
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
def sha256_file(path):
|
|
30
|
-
digest = hashlib.sha256()
|
|
31
|
-
size = 0
|
|
32
|
-
with Path(path).open("rb") as handle:
|
|
33
|
-
while True:
|
|
34
|
-
chunk = handle.read(1024 * 1024)
|
|
35
|
-
if not chunk:
|
|
36
|
-
break
|
|
37
|
-
size += len(chunk)
|
|
38
|
-
digest.update(chunk)
|
|
39
|
-
return digest.hexdigest(), size
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
def directory_integrity(path):
|
|
43
|
-
"""Hash ordinary files exactly like SuperCLI deploy preflight.
|
|
44
|
-
|
|
45
|
-
Each sorted entry contributes: rel + NUL + (mode & 0o777) + NUL + file sha256 + LF.
|
|
46
|
-
"""
|
|
47
|
-
root = Path(path)
|
|
48
|
-
digest = hashlib.sha256()
|
|
49
|
-
total_size = 0
|
|
50
|
-
count = 0
|
|
51
|
-
for candidate in sorted(root.rglob("*"), key=lambda item: item.relative_to(root).as_posix()):
|
|
52
|
-
if candidate.is_symlink():
|
|
53
|
-
raise ValueError(f"symlink is not allowed in artifact directory: {candidate}")
|
|
54
|
-
if candidate.is_dir():
|
|
55
|
-
continue
|
|
56
|
-
if not candidate.is_file():
|
|
57
|
-
raise ValueError(f"special file is not allowed in artifact directory: {candidate}")
|
|
58
|
-
mode = stat.S_IMODE(candidate.stat().st_mode) & 0o777
|
|
59
|
-
file_sha, size = sha256_file(candidate)
|
|
60
|
-
rel = candidate.relative_to(root).as_posix()
|
|
61
|
-
digest.update(rel.encode("utf-8") + b"\0" + format(mode, "o").encode("ascii") + b"\0" + file_sha.encode("ascii") + b"\n")
|
|
62
|
-
total_size += size
|
|
63
|
-
count += 1
|
|
64
|
-
return digest.hexdigest(), total_size, count
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
def builder_bundle_sha256(root):
|
|
68
|
-
root = Path(root)
|
|
69
|
-
entries = [root / "super_build.sh"]
|
|
70
|
-
entries.extend(
|
|
71
|
-
path for path in sorted((root / "scripts").rglob("*"))
|
|
72
|
-
if "__pycache__" not in path.parts and path.suffix != ".pyc"
|
|
73
|
-
)
|
|
74
|
-
digest = hashlib.sha256()
|
|
75
|
-
for path in entries:
|
|
76
|
-
if path.is_symlink():
|
|
77
|
-
raise ValueError(f"builder bundle contains symlink: {path}")
|
|
78
|
-
if not path.is_file():
|
|
79
|
-
continue
|
|
80
|
-
rel = path.relative_to(root).as_posix()
|
|
81
|
-
file_sha, _ = sha256_file(path)
|
|
82
|
-
mode = stat.S_IMODE(path.stat().st_mode) & 0o777
|
|
83
|
-
digest.update(rel.encode("utf-8") + b"\0" + format(mode, "o").encode("ascii") + b"\0" + file_sha.encode("ascii") + b"\n")
|
|
84
|
-
return digest.hexdigest()
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
def helper_timeout_seconds():
|
|
88
|
-
raw = os.environ.get("SUPERSDK_BUILD_HELPER_TIMEOUT_SECONDS")
|
|
89
|
-
if raw in (None, ""):
|
|
90
|
-
return DEFAULT_TIMEOUT_SECONDS
|
|
91
|
-
try:
|
|
92
|
-
value = float(raw)
|
|
93
|
-
if math.isfinite(value) and value > 0:
|
|
94
|
-
return value
|
|
95
|
-
except ValueError:
|
|
96
|
-
pass
|
|
97
|
-
print(f"[orchestrator] warning: invalid helper timeout {raw!r}; using {DEFAULT_TIMEOUT_SECONDS:g}s", file=sys.stderr)
|
|
98
|
-
return DEFAULT_TIMEOUT_SECONDS
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
def selected_projects(config, project_id):
|
|
102
|
-
normalized = supersdk_template.load_and_validate(config, project=project_id)
|
|
103
|
-
supersdk_template.require_selection(normalized, "all", project_id)
|
|
104
|
-
return normalized, normalized["projects"]
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
def helper_command(root, config, project, output_dir, evidence):
|
|
108
|
-
helper = Path(root) / "scripts" / f"build_{project['type']}.sh"
|
|
109
|
-
if not helper.is_file():
|
|
110
|
-
raise FileNotFoundError(f"fixed helper missing: {helper}")
|
|
111
|
-
return [
|
|
112
|
-
str(helper), "--build", "--config", str(config), "--project-id", project["projectId"],
|
|
113
|
-
"--output-dir", str(output_dir), "--evidence", str(evidence),
|
|
114
|
-
]
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
def run_helper(command, project_id, timeout):
|
|
118
|
-
try:
|
|
119
|
-
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, start_new_session=True)
|
|
120
|
-
except OSError as exc:
|
|
121
|
-
return 127, "", f"launch error: {exc}"
|
|
122
|
-
try:
|
|
123
|
-
stdout_raw, stderr_raw = process.communicate(timeout=timeout)
|
|
124
|
-
except subprocess.TimeoutExpired:
|
|
125
|
-
try:
|
|
126
|
-
os.killpg(process.pid, signal.SIGTERM)
|
|
127
|
-
except OSError:
|
|
128
|
-
process.kill()
|
|
129
|
-
stdout_raw, stderr_raw = process.communicate()
|
|
130
|
-
return 124, stdout_raw.decode("utf-8", "replace"), f"timeout after {timeout:g}s"
|
|
131
|
-
stdout = stdout_raw.decode("utf-8", "replace")
|
|
132
|
-
stderr = stderr_raw.decode("utf-8", "replace")
|
|
133
|
-
for line in stdout.splitlines():
|
|
134
|
-
print(f"[{project_id} stdout] {line}")
|
|
135
|
-
for line in stderr.splitlines():
|
|
136
|
-
print(f"[{project_id} stderr] {line}", file=sys.stderr)
|
|
137
|
-
return process.returncode, stdout, stderr
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
def classify_helper(exit_code, stdout, stderr):
|
|
141
|
-
if exit_code != 0:
|
|
142
|
-
excerpt = " ".join((stderr or stdout).split())
|
|
143
|
-
return "failed", cap_reason(f"exit_code={exit_code}" + (f"; {excerpt}" if excerpt else ""))
|
|
144
|
-
for line in (stdout + "\n" + stderr).splitlines():
|
|
145
|
-
if line.startswith("SKIP_") or line.startswith("BUILD SKIPPED"):
|
|
146
|
-
return "skipped", cap_reason(line)
|
|
147
|
-
return "success", None
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
def cap_reason(value):
|
|
151
|
-
return value if len(value) <= REASON_LIMIT else value[: REASON_LIMIT - 14] + "...(truncated)"
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
def write_json_atomic(path, payload):
|
|
155
|
-
path = Path(path)
|
|
156
|
-
path.parent.mkdir(parents=True, exist_ok=True)
|
|
157
|
-
temp = path.with_name(f".{path.name}.tmp.{os.getpid()}.{uuid.uuid4().hex}")
|
|
158
|
-
with temp.open("x", encoding="utf-8") as handle:
|
|
159
|
-
json.dump(payload, handle, indent=2, ensure_ascii=False)
|
|
160
|
-
handle.write("\n")
|
|
161
|
-
handle.flush()
|
|
162
|
-
os.fsync(handle.fileno())
|
|
163
|
-
os.replace(temp, path)
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
def ensure_evidence(path, project, status, reason):
|
|
167
|
-
path = Path(path)
|
|
168
|
-
if not path.is_file():
|
|
169
|
-
write_json_atomic(path, {
|
|
170
|
-
"schemaVersion": 1,
|
|
171
|
-
"projectId": project["projectId"],
|
|
172
|
-
"type": project["type"],
|
|
173
|
-
"status": status,
|
|
174
|
-
"reason": reason,
|
|
175
|
-
})
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
def relative_file_entry(path, build_root):
|
|
179
|
-
digest, size = sha256_file(path)
|
|
180
|
-
return {"path": Path(path).relative_to(build_root).as_posix(), "sha256": digest, "sizeBytes": size}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
def artifact_entry(path, build_root, artifact_id, kind=None, media_type=None):
|
|
184
|
-
path = Path(path)
|
|
185
|
-
if path.is_symlink():
|
|
186
|
-
raise ValueError(f"artifact may not be a symlink: {path}")
|
|
187
|
-
if path.is_dir():
|
|
188
|
-
digest, size, count = directory_integrity(path)
|
|
189
|
-
result = {
|
|
190
|
-
"id": artifact_id, "kind": "directory", "path": path.relative_to(build_root).as_posix(),
|
|
191
|
-
"sha256": digest, "sizeBytes": size, "fileCount": count,
|
|
192
|
-
}
|
|
193
|
-
else:
|
|
194
|
-
digest, size = sha256_file(path)
|
|
195
|
-
result = {
|
|
196
|
-
"id": artifact_id, "kind": kind or "file", "path": path.relative_to(build_root).as_posix(),
|
|
197
|
-
"sha256": digest, "sizeBytes": size,
|
|
198
|
-
}
|
|
199
|
-
if media_type:
|
|
200
|
-
result["mediaType"] = media_type
|
|
201
|
-
return result
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
def collect_artifacts(project, project_output, build_root):
|
|
205
|
-
project_output = Path(project_output)
|
|
206
|
-
candidates = [item for item in sorted(project_output.iterdir()) if item.name != "evidence.json"] if project_output.exists() else []
|
|
207
|
-
artifacts = []
|
|
208
|
-
if project["type"] == "android":
|
|
209
|
-
candidates = [item for item in candidates if item.is_file() and item.suffix.lower() in (".apk", ".aab")]
|
|
210
|
-
elif project["type"] == "ios":
|
|
211
|
-
candidates = [item for item in candidates if item.is_file() or item.is_dir()]
|
|
212
|
-
elif project["type"] == "site":
|
|
213
|
-
candidates = [item for item in candidates if item.name == "dist" or (item.is_file() and item.suffix == ".zip")]
|
|
214
|
-
else:
|
|
215
|
-
candidates = [item for item in candidates if item.is_file() and item.suffix in (".tar", ".docker")]
|
|
216
|
-
for index, candidate in enumerate(candidates, start=1):
|
|
217
|
-
kind = "docker-image-archive" if project["type"] == "service" else None
|
|
218
|
-
media = "application/vnd.docker.image.rootfs.diff.tar" if kind else None
|
|
219
|
-
if project["type"] == "site":
|
|
220
|
-
artifact_id = "site-dist" if candidate.is_dir() else "site-offline-zip"
|
|
221
|
-
elif project["type"] == "service":
|
|
222
|
-
artifact_id = "service-image"
|
|
223
|
-
elif project["type"] == "android":
|
|
224
|
-
artifact_id = "android-aab" if candidate.suffix.lower() == ".aab" else "android-apk"
|
|
225
|
-
if any(item["id"] == artifact_id for item in artifacts):
|
|
226
|
-
artifact_id = f"{artifact_id}-{index}"
|
|
227
|
-
else:
|
|
228
|
-
artifact_id = "ios-archive" if index == 1 else f"ios-archive-{index}"
|
|
229
|
-
artifacts.append(artifact_entry(candidate, build_root, artifact_id, kind, media))
|
|
230
|
-
return artifacts
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
def git_source(root):
|
|
234
|
-
try:
|
|
235
|
-
commit = subprocess.check_output(["git", "-C", str(root), "rev-parse", "HEAD"], text=True, stderr=subprocess.DEVNULL).strip()
|
|
236
|
-
dirty = bool(subprocess.check_output(["git", "-C", str(root), "status", "--porcelain"], text=True).strip())
|
|
237
|
-
return {"gitCommit": commit, "dirty": dirty}
|
|
238
|
-
except (OSError, subprocess.CalledProcessError):
|
|
239
|
-
return {"gitCommit": None, "dirty": None}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
def build_manifest(root, config_path, output_staging, project_id=None, cli_version=None):
|
|
243
|
-
raw = supersdk_template.load_config(config_path)
|
|
244
|
-
normalized, projects = selected_projects(config_path, project_id)
|
|
245
|
-
bundle_before = builder_bundle_sha256(root)
|
|
246
|
-
results = []
|
|
247
|
-
timeout = helper_timeout_seconds()
|
|
248
|
-
for project in projects:
|
|
249
|
-
project_output = Path(output_staging) / "projects" / project["projectId"]
|
|
250
|
-
project_output.mkdir(parents=True, exist_ok=False)
|
|
251
|
-
evidence_path = project_output / "evidence.json"
|
|
252
|
-
try:
|
|
253
|
-
command = helper_command(root, config_path, project, project_output, evidence_path)
|
|
254
|
-
exit_code, stdout, stderr = run_helper(command, project["projectId"], timeout)
|
|
255
|
-
status, reason = classify_helper(exit_code, stdout, stderr)
|
|
256
|
-
ensure_evidence(evidence_path, project, status, reason)
|
|
257
|
-
artifacts = collect_artifacts(project, project_output, output_staging) if status == "success" else []
|
|
258
|
-
if status == "success" and not artifacts:
|
|
259
|
-
status, reason = "failed", "helper reported success but produced no required artifact"
|
|
260
|
-
ensure_evidence(evidence_path, project, status, reason)
|
|
261
|
-
except Exception as exc:
|
|
262
|
-
status, reason, artifacts = "failed", cap_reason(f"internal orchestrator error: {exc}"), []
|
|
263
|
-
ensure_evidence(evidence_path, project, status, reason)
|
|
264
|
-
result = {
|
|
265
|
-
"projectId": project["projectId"], "type": project["type"], "status": status,
|
|
266
|
-
"evidence": relative_file_entry(evidence_path, output_staging), "artifacts": artifacts,
|
|
267
|
-
}
|
|
268
|
-
if status != "success":
|
|
269
|
-
result["reason"] = reason or status
|
|
270
|
-
results.append(result)
|
|
271
|
-
bundle_after = builder_bundle_sha256(root)
|
|
272
|
-
if bundle_after != bundle_before:
|
|
273
|
-
for result in results:
|
|
274
|
-
if result["status"] == "success":
|
|
275
|
-
result["status"] = "failed"
|
|
276
|
-
result["reason"] = "builder bundle changed during build"
|
|
277
|
-
return {
|
|
278
|
-
"schemaVersion": MANIFEST_SCHEMA_VERSION,
|
|
279
|
-
"kind": "super-build-manifest",
|
|
280
|
-
"createdAt": datetime.now(timezone.utc).isoformat().replace("+00:00", "Z"),
|
|
281
|
-
"builder": {"engineVersion": supersdk_template.ENGINE_VERSION, "cliVersion": cli_version, "bundleSha256": bundle_before},
|
|
282
|
-
"config": {
|
|
283
|
-
"schemaVersion": supersdk_template.CONFIG_SCHEMA_VERSION,
|
|
284
|
-
"sha256": supersdk_template.canonical_config_sha256(raw),
|
|
285
|
-
"spid": normalized["spid"],
|
|
286
|
-
},
|
|
287
|
-
"source": git_source(root),
|
|
288
|
-
"selection": {"mode": "single" if project_id else "all", "projectIds": [item["projectId"] for item in projects]},
|
|
289
|
-
"projects": results,
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
def summary_from_manifest(manifest):
|
|
294
|
-
failed = any(item["status"] == "failed" for item in manifest["projects"])
|
|
295
|
-
skipped_only = bool(manifest["projects"]) and all(item["status"] == "skipped" for item in manifest["projects"])
|
|
296
|
-
overall = "failed" if failed else ("skipped" if skipped_only else "success")
|
|
297
|
-
return {
|
|
298
|
-
"schemaVersion": 1,
|
|
299
|
-
"overallStatus": overall,
|
|
300
|
-
"overallExitCode": 1 if failed else 0,
|
|
301
|
-
"manifest": MANIFEST_FILENAME,
|
|
302
|
-
"selection": manifest["selection"],
|
|
303
|
-
"projects": [{"projectId": item["projectId"], "type": item["type"], "status": item["status"], **({"reason": item["reason"]} if "reason" in item else {})} for item in manifest["projects"]],
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
def main(argv=None):
|
|
308
|
-
parser = argparse.ArgumentParser(description="Build SuperSDK projects with fixed helpers and emit a portable manifest")
|
|
309
|
-
parser.add_argument("--root", required=True)
|
|
310
|
-
parser.add_argument("--config", required=True)
|
|
311
|
-
parser.add_argument("--output-dir", required=True)
|
|
312
|
-
parser.add_argument("--project")
|
|
313
|
-
parser.add_argument("--cli-version")
|
|
314
|
-
args = parser.parse_args(argv)
|
|
315
|
-
root = Path(args.root).resolve()
|
|
316
|
-
config = Path(args.config).resolve()
|
|
317
|
-
output = Path(args.output_dir).resolve()
|
|
318
|
-
if output.exists():
|
|
319
|
-
print(f"BUILD_OUTPUT_EXISTS: {output}", file=sys.stderr)
|
|
320
|
-
return 1
|
|
321
|
-
output.parent.mkdir(parents=True, exist_ok=True)
|
|
322
|
-
staging = output.with_name(f".{output.name}.staging.{os.getpid()}.{uuid.uuid4().hex}")
|
|
323
|
-
try:
|
|
324
|
-
staging.mkdir()
|
|
325
|
-
manifest = build_manifest(root, config, staging, args.project, args.cli_version)
|
|
326
|
-
write_json_atomic(staging / MANIFEST_FILENAME, manifest)
|
|
327
|
-
os.replace(staging, output)
|
|
328
|
-
summary = summary_from_manifest(manifest)
|
|
329
|
-
print(SUMMARY_PREFIX + json.dumps(summary, separators=(",", ":")))
|
|
330
|
-
return summary["overallExitCode"]
|
|
331
|
-
except supersdk_template.ConfigError as exc:
|
|
332
|
-
print(str(exc), file=sys.stderr)
|
|
333
|
-
return 1
|
|
334
|
-
except Exception as exc:
|
|
335
|
-
print(f"internal orchestrator error: {exc}", file=sys.stderr)
|
|
336
|
-
return 1
|
|
337
|
-
finally:
|
|
338
|
-
if staging.exists():
|
|
339
|
-
import shutil
|
|
340
|
-
shutil.rmtree(staging, ignore_errors=True)
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
if __name__ == "__main__":
|
|
344
|
-
raise SystemExit(main())
|