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/index.js CHANGED
@@ -259,6 +259,11 @@ function validateBinariesExtendedFields(config) {
259
259
  }
260
260
  }
261
261
  }
262
+ if (config.archiveNameTemplate) {
263
+ if (!config.archiveNameTemplate.includes("{{platform}}")) {
264
+ throw new Error("Binaries config: archiveNameTemplate must contain {{platform}} placeholder");
265
+ }
266
+ }
262
267
  }
263
268
  function validateBinariesConfig(config) {
264
269
  if (!config.enabled) {
@@ -7408,9 +7413,14 @@ function getSourceKey(config, platform5) {
7408
7413
  }
7409
7414
  return platform5;
7410
7415
  }
7411
- function getArchivePath(config, platform5) {
7416
+ var DEFAULT_ARCHIVE_NAME_TEMPLATE = "{{name}}-{{platform}}.tar.gz";
7417
+ function getArchiveName(config, platform5) {
7418
+ const template = config.archiveNameTemplate ?? DEFAULT_ARCHIVE_NAME_TEMPLATE;
7412
7419
  const sourceKey = getSourceKey(config, platform5);
7413
- const archiveName = `${config.name}-${sourceKey}.tar.gz`;
7420
+ return template.replace(/\{\{name\}\}/g, config.name).replace(/\{\{platform\}\}/g, sourceKey);
7421
+ }
7422
+ function getArchivePath(config, platform5) {
7423
+ const archiveName = getArchiveName(config, platform5);
7414
7424
  return resolve2(config.distDir, archiveName);
7415
7425
  }
7416
7426
  async function validateArchiveExists(config, platform5) {
@@ -8406,4 +8416,4 @@ export {
8406
8416
  ALL_PLATFORMS
8407
8417
  };
8408
8418
 
8409
- //# debugId=0CCB1F1FA688A2D464756E2164756E21
8419
+ //# debugId=D5FEBF49345C86FA64756E2164756E21