Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions pkg/renovate/bump/bump.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"fmt"
"io"
"net/http"
"regexp"
"strconv"
"strings"

Expand Down Expand Up @@ -225,8 +224,7 @@ func updateGitCheckout(ctx context.Context, node *yaml.Node, expectedGitSha stri
if err != nil {
log.Infof("git-checkout node does not contain a tag, assume we need to update the expected-commit sha")
} else {
versionPattern := regexp.MustCompile(`\${{vars\..+}}`)
if !strings.Contains(tag.Value, "${{package.version}}") && !versionPattern.MatchString(tag.Value) {
if !strings.Contains(tag.Value, "${{package.version}}") && !strings.Contains(tag.Value, "${{vars.mangled-package-version}}") {
Comment thread
imjasonh marked this conversation as resolved.
log.Infof("Skipping git-checkout node as it does not contain a version substitution so assuming it is not the main checkout")
return nil
}
Expand All @@ -237,7 +235,7 @@ func updateGitCheckout(ctx context.Context, node *yaml.Node, expectedGitSha stri
if expectedGitSha != "" {
// Update expected hash nodes.
nodeCommit, err := renovate.NodeFromMapping(withNode, "expected-commit")
if err == nil {
if err == nil && !strings.Contains(nodeCommit.Value, "${{") {
Comment thread
debasishbsws marked this conversation as resolved.
nodeCommit.Value = expectedGitSha
log.Infof(" expected-commit: %s", expectedGitSha)
}
Expand Down
Loading