Skip to content

Commit

Permalink
Fix filename, add reponame as prefix to tag_name (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinraju authored Jun 10, 2022
1 parent 0431bf6 commit 768e566
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,17 @@ class ReleaseDownloader {
}
}
if (downloadSettings.tarBall) {
const repoName = downloadSettings.sourceRepoPath.split("/")[1];
downloads.push({
fileName: `${ghRelease.tag_name}.tar.gz`,
fileName: `${repoName}-${ghRelease.tag_name}.tar.gz`,
url: ghRelease.tarball_url,
isTarBallOrZipBall: true
});
}
if (downloadSettings.zipBall) {
const repoName = downloadSettings.sourceRepoPath.split("/")[1];
downloads.push({
fileName: `${ghRelease.tag_name}.zip`,
fileName: `${repoName}-${ghRelease.tag_name}.zip`,
url: ghRelease.zipball_url,
isTarBallOrZipBall: true
});
Expand Down
15 changes: 5 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/release-downloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,18 @@ export class ReleaseDownloader {
}

if (downloadSettings.tarBall) {
const repoName = downloadSettings.sourceRepoPath.split("/")[1]
downloads.push({
fileName: `${ghRelease.tag_name}.tar.gz`,
fileName: `${repoName}-${ghRelease.tag_name}.tar.gz`,
url: ghRelease.tarball_url,
isTarBallOrZipBall: true
})
}

if (downloadSettings.zipBall) {
const repoName = downloadSettings.sourceRepoPath.split("/")[1]
downloads.push({
fileName: `${ghRelease.tag_name}.zip`,
fileName: `${repoName}-${ghRelease.tag_name}.zip`,
url: ghRelease.zipball_url,
isTarBallOrZipBall: true
})
Expand Down

0 comments on commit 768e566

Please sign in to comment.