Skip to content

Commit 2703166

Browse files
authored
Minor fixes to update-rollouts-manager script (#747)
Signed-off-by: Jonathan West <[email protected]>
1 parent d6d18be commit 2703166

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

hack/upgrade-rollouts-manager/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ The Go code and script in this directory will automatically open a pull request
1212
### Prerequisites
1313
- GitHub CLI (_gh_) installed and on PATH
1414
- Go installed and on PATH
15-
- Operator-sdk installed and on PATH
1615
- 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`)
1716
- Your local SSH key registered (e.g. `~/.ssh/id_rsa.pub`) with GitHub to allow git clone via SSH
1817

hack/upgrade-rollouts-manager/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func main() {
4747
}
4848
commitIds := strings.Split(stdout, "\n")
4949
if len(commitIds) == 0 {
50-
exitWithError(fmt.Errorf("unable to retrive commit ids"))
50+
exitWithError(fmt.Errorf("unable to retrieve commit ids"))
5151
}
5252

5353
mostRecentCommitID := commitIds[0]
@@ -133,7 +133,7 @@ func createNewCommitAndBranch(latestRolloutsManagerCommitId string, newBranchNam
133133
{"git", "stash"},
134134
{"git", "fetch", "parent"},
135135
{"git", "checkout", "master"},
136-
{"git", "rebase", "parent/master"},
136+
{"git", "reset", "--hard", "parent/master"},
137137
{"git", "checkout", "-b", newBranchName},
138138
}
139139

@@ -257,7 +257,7 @@ func regenerateE2ETestScript(commitID string, pathToGitRepo string) error {
257257

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

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

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

0 commit comments

Comments
 (0)