gitverse-release 3.7.0 → 3.7.1
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/cli.js +13 -3
- package/dist/cli.js.map +4 -4
- package/dist/index.js +13 -3
- package/dist/index.js.map +4 -4
- package/dist/types.d.ts +7 -0
- package/dist/utils/binary-platforms.d.ts +8 -0
- package/package.json +1 -1
- package/schema.json +6 -0
package/dist/cli.js
CHANGED
|
@@ -260,6 +260,11 @@ function validateBinariesExtendedFields(config) {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
+
if (config.archiveNameTemplate) {
|
|
264
|
+
if (!config.archiveNameTemplate.includes("{{platform}}")) {
|
|
265
|
+
throw new Error("Binaries config: archiveNameTemplate must contain {{platform}} placeholder");
|
|
266
|
+
}
|
|
267
|
+
}
|
|
263
268
|
}
|
|
264
269
|
function validateBinariesConfig(config) {
|
|
265
270
|
if (!config.enabled) {
|
|
@@ -7409,9 +7414,14 @@ function getSourceKey(config, platform5) {
|
|
|
7409
7414
|
}
|
|
7410
7415
|
return platform5;
|
|
7411
7416
|
}
|
|
7412
|
-
|
|
7417
|
+
var DEFAULT_ARCHIVE_NAME_TEMPLATE = "{{name}}-{{platform}}.tar.gz";
|
|
7418
|
+
function getArchiveName(config, platform5) {
|
|
7419
|
+
const template = config.archiveNameTemplate ?? DEFAULT_ARCHIVE_NAME_TEMPLATE;
|
|
7413
7420
|
const sourceKey = getSourceKey(config, platform5);
|
|
7414
|
-
|
|
7421
|
+
return template.replace(/\{\{name\}\}/g, config.name).replace(/\{\{platform\}\}/g, sourceKey);
|
|
7422
|
+
}
|
|
7423
|
+
function getArchivePath(config, platform5) {
|
|
7424
|
+
const archiveName = getArchiveName(config, platform5);
|
|
7415
7425
|
return resolve2(config.distDir, archiveName);
|
|
7416
7426
|
}
|
|
7417
7427
|
async function validateArchiveExists(config, platform5) {
|
|
@@ -8924,4 +8934,4 @@ Usage: gitverse-release create-only --tag <tag> [--package <name>]`);
|
|
|
8924
8934
|
}
|
|
8925
8935
|
main();
|
|
8926
8936
|
|
|
8927
|
-
//# debugId=
|
|
8937
|
+
//# debugId=7A7E2AC4FD2F36D964756E2164756E21
|