pakstr 0.8.1 → 0.8.2
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.
|
@@ -37,13 +37,26 @@ class LocalGradleRunner {
|
|
|
37
37
|
streamOutput: true,
|
|
38
38
|
});
|
|
39
39
|
const artifactPath = requireApk(androidRoot, "release");
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
let verification;
|
|
41
|
+
try {
|
|
42
|
+
const executor = createLocalVerificationExecutor(signing);
|
|
43
|
+
verification = (0, releaseVerification_1.verifyReleaseApk)({
|
|
44
|
+
artifactPath,
|
|
45
|
+
expectedMetadata: request.expectedMetadata,
|
|
46
|
+
signing,
|
|
47
|
+
executor,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
if (error instanceof Error &&
|
|
52
|
+
error.message.startsWith("Required Android verification tool not found")) {
|
|
53
|
+
console.warn("⚠️ Local release verification skipped: Android verification tools are missing.");
|
|
54
|
+
console.warn("ℹ️ Production releases should use CI Docker verification.");
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
47
60
|
return { artifactPath, verification };
|
|
48
61
|
}
|
|
49
62
|
}
|
|
@@ -67,9 +80,18 @@ function resolveTool(tool, androidHome) {
|
|
|
67
80
|
if (tool === "keytool")
|
|
68
81
|
return "keytool";
|
|
69
82
|
if (tool === "apkanalyzer") {
|
|
70
|
-
const
|
|
71
|
-
if (!fs_1.default.existsSync(
|
|
72
|
-
throw new Error(`
|
|
83
|
+
const cmdlineTools = path_1.default.join(androidHome, "cmdline-tools");
|
|
84
|
+
if (!fs_1.default.existsSync(cmdlineTools)) {
|
|
85
|
+
throw new Error(`Android cmdline-tools directory not found: ${cmdlineTools}`);
|
|
86
|
+
}
|
|
87
|
+
const versions = fs_1.default
|
|
88
|
+
.readdirSync(cmdlineTools)
|
|
89
|
+
.sort((a, b) => b.localeCompare(a, undefined, { numeric: true }));
|
|
90
|
+
const analyzer = versions
|
|
91
|
+
.map(version => path_1.default.join(cmdlineTools, version, "bin", "apkanalyzer"))
|
|
92
|
+
.find(candidate => fs_1.default.existsSync(candidate));
|
|
93
|
+
if (!analyzer) {
|
|
94
|
+
throw new Error(`Required Android verification tool not found under ${cmdlineTools}`);
|
|
73
95
|
}
|
|
74
96
|
return analyzer;
|
|
75
97
|
}
|