From fcc9229a88dd6a630156307a56f4a3886134c33b Mon Sep 17 00:00:00 2001 From: Mustafa Gezen Date: Fri, 23 Apr 2021 11:17:41 +0200 Subject: [PATCH] Add new case for module ref converting --- internal/patch.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/patch.go b/internal/patch.go index d71f706..88f502d 100644 --- a/internal/patch.go +++ b/internal/patch.go @@ -226,7 +226,7 @@ func getTipStream(pd *data.ProcessData, module string, pushBranch string, origPu log.Fatal("could not find tip hash") } - return tipHash + return strings.TrimSpace(tipHash) } func patchModuleYaml(pd *data.ProcessData, md *data.ModeData) { @@ -264,7 +264,9 @@ func patchModuleYaml(pd *data.ProcessData, md *data.ModeData) { // TODO: maybe point to correct release tag? but refer to latest for now, // we're bootstrapping a new distro for latest RHEL8 anyways. So earlier // versions are not that important - if strings.HasPrefix(rpm.Ref, "stream-rhel-") { + if strings.HasPrefix(rpm.Ref, "stream-rhel-rhel-") { + pushBranch = md.PushBranch + } else if strings.HasPrefix(rpm.Ref, "stream-rhel-") { repString := fmt.Sprintf("%s%ss-", pd.BranchPrefix, string(split[4][0])) newString := fmt.Sprintf("%s%s-", pd.BranchPrefix, string(split[4][0])) pushBranch = strings.Replace(md.PushBranch, repString, newString, 1)