Skip to content

Minor fixes to update-rollouts-manager script #747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion hack/upgrade-rollouts-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ The Go code and script in this directory will automatically open a pull request
### Prerequisites
- GitHub CLI (_gh_) installed and on PATH
- Go installed and on PATH
- Operator-sdk installed and on PATH
- You must have your own fork of the [argo-rollouts-manager](https://github.com/argoproj-labs/argo-rollouts-manager) repository in GitHub(e.g. `jgwest/argo-rollouts-manager`)
- Your local SSH key registered (e.g. `~/.ssh/id_rsa.pub`) with GitHub to allow git clone via SSH

Expand Down
6 changes: 3 additions & 3 deletions hack/upgrade-rollouts-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func main() {
}
commitIds := strings.Split(stdout, "\n")
if len(commitIds) == 0 {
exitWithError(fmt.Errorf("unable to retrive commit ids"))
exitWithError(fmt.Errorf("unable to retrieve commit ids"))
}

mostRecentCommitID := commitIds[0]
Expand Down Expand Up @@ -133,7 +133,7 @@ func createNewCommitAndBranch(latestRolloutsManagerCommitId string, newBranchNam
{"git", "stash"},
{"git", "fetch", "parent"},
{"git", "checkout", "master"},
{"git", "rebase", "parent/master"},
{"git", "reset", "--hard", "parent/master"},
{"git", "checkout", "-b", newBranchName},
}

Expand Down Expand Up @@ -257,7 +257,7 @@ func regenerateE2ETestScript(commitID string, pathToGitRepo string) error {

for _, line := range strings.Split(string(fileBytes), "\n") {

if strings.Contains(line, envName) {
if strings.HasPrefix(line, envName+"=") {

res += envName + "=" + commitID + "\n"

Expand Down