mirror of
https://github.com/robinraju/release-downloader.git
synced 2026-10-02 08:46:05 +03:00
Merge branch 'PayFacto-Pos-download-all-assets' into main
This commit is contained in:
3 files changed
+660
-649
No files matched your search
+1
-1
@@ -15,7 +15,7 @@ inputs:
|
||||
default: ""
|
||||
required: false
|
||||
fileName:
|
||||
description: "Name of the file to download"
|
||||
description: "Name of the file to download (if empty it will download all assets)"
|
||||
default: ""
|
||||
required: false
|
||||
tarBall:
|
||||
|
||||
Vendored
+642
-642
File diff suppressed because it is too large.
Load diff
+17
-6
@@ -119,13 +119,24 @@ function resolveAssets(
|
||||
const downloads: DownloadMetaData[] = []
|
||||
|
||||
if (_release && _release.assets.length > 0) {
|
||||
const asset = _release.assets.find(a => a.name === _settings.fileName)
|
||||
if (asset) {
|
||||
const dData: DownloadMetaData = {
|
||||
fileName: asset["name"],
|
||||
url: asset["url"]
|
||||
if (_settings.fileName.length === 0) {
|
||||
// Download all assets
|
||||
for (const asset of _release.assets) {
|
||||
const dData: DownloadMetaData = {
|
||||
fileName: asset["name"],
|
||||
url: asset["url"]
|
||||
}
|
||||
downloads.push(dData)
|
||||
}
|
||||
} else if (_settings.fileName.length > 0) {
|
||||
const asset = _release.assets.find(a => a.name === _settings.fileName)
|
||||
if (asset) {
|
||||
const dData: DownloadMetaData = {
|
||||
fileName: asset["name"],
|
||||
url: asset["url"]
|
||||
}
|
||||
downloads.push(dData)
|
||||
}
|
||||
downloads.push(dData)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user