Skip to content

Commit f8ba0b9

Browse files
authored
chore(internal/actions): fix updateall (googleapis#8750)
Do not create nested commit for root module
1 parent 422cda8 commit f8ba0b9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGES.md

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
### Bug Fixes
77

8-
* **/Users/chrisdsmith/oss/google-cloud-go:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d))
98
* **all:** Update golang.org/x/net to v0.17.0 ([#8705](https://github.com/googleapis/google-cloud-go/issues/8705)) ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d))
109
* **internal/aliasgen:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d))
1110
* **internal/examples/fake:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d))

internal/actions/cmd/updateall/main.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ func update(modDir, dep, version, rootDir string) error {
135135
}
136136

137137
if !*quiet {
138-
scope := strings.TrimPrefix(strings.TrimSpace(modDir), rootDir+"/")
139-
if scope == "" || scope == "main" || strings.Contains(scope, "internal/") {
138+
modDir = strings.TrimSpace(modDir)
139+
scope := strings.TrimPrefix(modDir, rootDir+"/")
140+
if scope == modDir || scope == "" || scope == "main" || strings.Contains(scope, "internal/") {
140141
return nil
141142
}
142143
nestedCommits.WriteString("BEGIN_NESTED_COMMIT\n")

0 commit comments

Comments
 (0)