#45 srpm/go.lua meta: Set `%gourl` after `forge.meta` call
Merged 5 days ago by eclipseo. Opened 3 months ago by gotmax23.
gotmax23/go-rpm-macros master  into  master

file modified
+3 -5
@@ -98,13 +98,11 @@ 

    if (cleangoipath ~= spec["goipath"]) then

      fedora.explicitset(goipath .. suffix, cleangoipath)

    end

-   if (spec["forgeurl"] ~= "") then

-     fedora.safeset("gourl"    .. suffix, "%{forgeurl"        .. suffix .. "}",verbose)

-   else

-     fedora.safeset("gourl"    .. suffix, "https://%{goipath" .. suffix .. "}",verbose)

-     fedora.safeset("forgeurl" .. suffix, "%{gourl"           .. suffix .. "}",verbose)

+   if (spec["forgeurl"] == "") then

+     fedora.safeset("forgeurl"    .. suffix, "https://%{goipath" .. suffix .. "}",verbose)

    end

    forge.meta(suffix, verbose, informative, silent)

+   fedora.safeset("gourl"    .. suffix, "%{forgeurl"        .. suffix .. "}",verbose)

    if (rpm.expand("%{?forgesource" .. suffix .. "}") ~= "") then

      fedora.safeset("gosource" .. suffix, "%{forgesource" .. suffix .. "}",verbose)

    else

forge.meta sanitizes the result of %forgeurl, so we want to set
%gourl based on the sanitzed value. For example, forge.meta changes
https://github.com/cli/cli/v2 to https://github.com/cli/cli.

Signed-off-by: Maxwell G gotmax@e.email

rebased onto 76ad82e

3 months ago

Pull-Request has been merged by eclipseo

5 days ago
Metadata