release-it-gitea 1.4.1 → 1.5.0

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.
Files changed (2) hide show
  1. package/lib/index.js +6 -2
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -228,7 +228,7 @@ class GiteaPlugin extends Plugin {
228
228
  for (const file of files) {
229
229
  const stats = statSync(file);
230
230
  if (stats.isFile()) {
231
- const relativePath = basePath ? file.replace(basePath, "").replace(/^\//, "") : basename(file);
231
+ const relativePath = basePath ? join(basePath, file.split(basePath)[1]) : basename(file);
232
232
  archive.file(file, { name: relativePath });
233
233
  }
234
234
  }
@@ -324,7 +324,11 @@ class GiteaPlugin extends Plugin {
324
324
  mkdirSync(dirname(tempZipPath), { recursive: true });
325
325
  } catch (error) {
326
326
  }
327
- await this.createZipArchive(files, tempZipPath, dirname(config.path));
327
+ await this.createZipArchive(
328
+ files,
329
+ tempZipPath,
330
+ dirname(config.path).replace(/\*/g, "")
331
+ );
328
332
  await this.uploadAsset(releaseId, tempZipPath, zipName, config.label);
329
333
  const { unlinkSync } = await import("fs");
330
334
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-it-gitea",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "release-it gitea plugin",
5
5
  "keywords": [
6
6
  "gitea",