fix(updateserver): version from asset filename takes priority #469
@@ -286,8 +286,8 @@ func GenerateJoomlaXML(ctx context.Context, repo *repo_model.Repository, require
|
||||
downloadURL = fmt.Sprintf("%s/archive/%s.zip", repoLink, rel.TagName)
|
||||
}
|
||||
|
||||
// Extract version from the asset filename first (most accurate),
|
||||
// then fall back to tag name, then release title.
|
||||
// Extract version: prefer asset filename (matches actual download),
|
||||
// then tag name, then release title. Only fall through when empty.
|
||||
version := ""
|
||||
if zipName != "" {
|
||||
version = extractVersion(zipName)
|
||||
@@ -295,8 +295,7 @@ func GenerateJoomlaXML(ctx context.Context, repo *repo_model.Repository, require
|
||||
if version == "" {
|
||||
version = extractVersion(rel.TagName)
|
||||
}
|
||||
// If the tag is a stream name (not a version), try the release title instead.
|
||||
if version == "" || isStreamName(rel.TagName, streams) {
|
||||
if version == "" {
|
||||
version = extractVersion(rel.Title)
|
||||
}
|
||||
// Last resort: use the tag name as-is.
|
||||
|
||||
Reference in New Issue
Block a user