| |
@@ -69,6 +69,19 @@
|
| |
-- numbers on top of it, keep a - prefix before version strings
|
| |
result = string.gsub(result, "%-v([%.%d]+)$", "-%1")
|
| |
result = string.gsub(result, "%-v([%.%d]+%-)", "-%1")
|
| |
+ -- according to the guidelines, if the base package name does not end with
|
| |
+ -- a digit, the version MUST be directly appended to the package name with
|
| |
+ -- no intervening separator.
|
| |
+ -- If the base package name ends with a digit, a single underscore (_) MUST
|
| |
+ -- be appended to the name, and the version MUST be appended to that, in
|
| |
+ -- order to avoid confusion over where the name ends and the version begins.
|
| |
+ result = string.gsub(result, "([^-]*)(%-?)([%.%d]+)$", function(prior, hyphen, version)
|
| |
+ if string.find(prior, "%d$") then
|
| |
+ return prior .. "_" .. version
|
| |
+ else
|
| |
+ return prior .. version
|
| |
+ end
|
| |
+ end)
|
| |
return(result)
|
| |
end
|
| |
|
| |
The package version, which SHOULD include the periods present in the original
version.
If the base package name ends with a digit, a single underscore (_) MUST be
appended to the name, and the version MUST be appended to that, in order to
avoid confusion over where the name ends and the version begins.
If the base package name does not end with a digit, the version MUST be
directly appended to the package name with no intervening separator.
Fix https://pagure.io/GoSIG/go-sig/issue/53