bin/get-github-release: fetch the most recent not the least recent
This commit is contained in:
parent
0d475958c7
commit
bb80586473
1 changed files with 4 additions and 2 deletions
|
@ -244,8 +244,10 @@ func getAssetFromReleasesPage(project string, matchName *regexp.Regexp) (assetUR
|
||||||
if a.Key == "href" {
|
if a.Key == "href" {
|
||||||
if name := path.Base(a.Val); matchName.MatchString(name) && isOurOsArch(name) {
|
if name := path.Base(a.Val); matchName.MatchString(name) && isOurOsArch(name) {
|
||||||
if u, err := rest.URLJoin(base, a.Val); err == nil {
|
if u, err := rest.URLJoin(base, a.Val); err == nil {
|
||||||
assetName = name
|
if assetName == "" {
|
||||||
assetURL = u.String()
|
assetName = name
|
||||||
|
assetURL = u.String()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue