mirror of
https://github.com/rocky-linux/srpmproc.git
synced 2024-06-02 08:10:17 +00:00
Add failsafe to branch detection
This commit is contained in:
parent
4c689576dc
commit
cd1fbccc74
|
@ -294,7 +294,7 @@ func patchModuleYaml(pd *data.ProcessData, md *data.ModeData) {
|
||||||
// versions are not that important
|
// versions are not that important
|
||||||
if strings.HasPrefix(rpm.Ref, "stream-rhel-rhel-") {
|
if strings.HasPrefix(rpm.Ref, "stream-rhel-rhel-") {
|
||||||
pushBranch = defaultBranch
|
pushBranch = defaultBranch
|
||||||
} else if strings.HasPrefix(rpm.Ref, "stream-rhel-") {
|
} else if strings.HasPrefix(rpm.Ref, "stream-rhel-") && len(split) > 4 {
|
||||||
repString := fmt.Sprintf("%s%ss-", pd.BranchPrefix, string(split[4][0]))
|
repString := fmt.Sprintf("%s%ss-", pd.BranchPrefix, string(split[4][0]))
|
||||||
newString := fmt.Sprintf("%s%s-", 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)
|
pushBranch = strings.Replace(md.PushBranch, repString, newString, 1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user