fix(updateserver): extract version from asset filename, omit client for packages
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
- Version now extracted from the zip asset filename first (most accurate), falling back to tag name then release title. Fixes mismatch where title version was updated but asset was stale. - Omit <client> element for package extension types (packages manage their own sub-extension clients per Joomla spec). - Make Client field omitempty so empty string doesn't render empty tag. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -37,7 +37,7 @@ type xmlUpdate struct {
|
||||
TargetPlatform xmlTargetPlat `xml:"targetplatform"`
|
||||
SHA256 string `xml:"sha256,omitempty"`
|
||||
SHA512 string `xml:"sha512,omitempty"`
|
||||
Client string `xml:"client"`
|
||||
Client string `xml:"client,omitempty"`
|
||||
PHPMinimum string `xml:"php_minimum,omitempty"`
|
||||
Description string `xml:"description,omitempty"`
|
||||
CreationDate string `xml:"creationDate,omitempty"`
|
||||
@@ -286,7 +286,15 @@ func GenerateJoomlaXML(ctx context.Context, repo *repo_model.Repository, require
|
||||
downloadURL = fmt.Sprintf("%s/archive/%s.zip", repoLink, rel.TagName)
|
||||
}
|
||||
|
||||
version := extractVersion(rel.TagName)
|
||||
// Extract version from the asset filename first (most accurate),
|
||||
// then fall back to tag name, then release title.
|
||||
version := ""
|
||||
if zipName != "" {
|
||||
version = extractVersion(zipName)
|
||||
}
|
||||
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) {
|
||||
version = extractVersion(rel.Title)
|
||||
@@ -313,12 +321,19 @@ func GenerateJoomlaXML(ctx context.Context, repo *repo_model.Repository, require
|
||||
infoURL = cfg.InfoURL
|
||||
}
|
||||
|
||||
// Joomla <client> element: only relevant for plugins/modules (site vs administrator).
|
||||
// Packages manage their own sub-extension clients; omit for package type.
|
||||
client := "site"
|
||||
if extType == "package" {
|
||||
client = ""
|
||||
}
|
||||
|
||||
u := xmlUpdate{
|
||||
Name: displayName,
|
||||
Description: desc,
|
||||
Element: element,
|
||||
Type: extType,
|
||||
Client: "site",
|
||||
Client: client,
|
||||
Version: version,
|
||||
CreationDate: time.Unix(int64(rel.CreatedUnix), 0).Format("2006-01-02"),
|
||||
InfoURL: xmlInfoURL{
|
||||
|
||||
Reference in New Issue
Block a user