@pmate/cli 0.25.4 → 0.25.5
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/index.js +8 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22342,16 +22342,7 @@ var AndroidApkReleaseService = class {
|
|
|
22342
22342
|
if (cwd) return import_node_path24.default.resolve(process.cwd(), cwd);
|
|
22343
22343
|
const repository = this.getRepository(service);
|
|
22344
22344
|
if (repository) {
|
|
22345
|
-
|
|
22346
|
-
if (repoName) {
|
|
22347
|
-
const candidates = [
|
|
22348
|
-
import_node_path24.default.join(import_node_os9.default.homedir(), "dev", "pmate-envs", repoName),
|
|
22349
|
-
import_node_path24.default.join(import_node_os9.default.homedir(), "dev", "pmate", repoName)
|
|
22350
|
-
];
|
|
22351
|
-
for (const candidate of candidates) {
|
|
22352
|
-
if ((0, import_node_fs20.existsSync)(candidate)) return candidate;
|
|
22353
|
-
}
|
|
22354
|
-
}
|
|
22345
|
+
return resolveRepositoryLocalRoot(repository);
|
|
22355
22346
|
}
|
|
22356
22347
|
return process.cwd();
|
|
22357
22348
|
}
|
|
@@ -22444,6 +22435,13 @@ function bumpVersionName(versionName, bump) {
|
|
|
22444
22435
|
function buildAndroidApkObjectKey(namespace, serviceName, versionName) {
|
|
22445
22436
|
return `apks/${encodePathSegment(namespace)}/${encodePathSegment(serviceName)}/${encodePathSegment(versionName)}.apk`;
|
|
22446
22437
|
}
|
|
22438
|
+
function resolveRepositoryLocalRoot(repository) {
|
|
22439
|
+
const repoName = repository.replace(/\/+$/, "").split("/").pop()?.replace(/\.git$/i, "");
|
|
22440
|
+
if (!repoName) {
|
|
22441
|
+
throw new Error(`Invalid repository: ${repository}`);
|
|
22442
|
+
}
|
|
22443
|
+
return import_node_path24.default.join(import_node_os9.default.homedir(), "dev", "pmate", repoName);
|
|
22444
|
+
}
|
|
22447
22445
|
function bumpAndroidGradleVersionText(source, bump) {
|
|
22448
22446
|
const versionNameMatch = source.match(/(^\s*versionName\s+["'])([^"']+)(["']\s*$)/m) ?? source.match(/(^\s*versionName\s*=\s*["'])([^"']+)(["']\s*$)/m);
|
|
22449
22447
|
const versionCodeMatch = source.match(/(^\s*versionCode\s+)(\d+)(\s*$)/m) ?? source.match(/(^\s*versionCode\s*=\s*)(\d+)(\s*$)/m);
|