mirror of
https://github.com/ivabus/pantry
synced 2025-06-08 08:20:32 +03:00
Coerce bottle names to SemVer for versions.txt
This commit is contained in:
parent
0d38f783fb
commit
ac78ce218d
1 changed files with 3 additions and 1 deletions
|
@ -81,7 +81,9 @@ async function get_versions(pkg: Package): Promise<SemVer[]> {
|
|||
?.contents
|
||||
?.compact(x => x.key)
|
||||
.map(x => basename(x))
|
||||
.compact(semver.coerce) //FIXME coerce is too loose
|
||||
.filter(x => x.match(/v.*\.tar\.gz$/))
|
||||
.map(x => x.replace(/v(.*)\.tar\.gz/, "$1"))
|
||||
.compact(semver.parse)
|
||||
?? []
|
||||
|
||||
// have to add pkg.version as put and get are not atomic
|
||||
|
|
Loading…
Reference in a new issue