From b5f205cc94ed4371d8349300e120de36b537585d Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Thu, 19 Oct 2023 13:45:00 -0600 Subject: [PATCH] chore(internal/actions): fix updateall (#8750) Do not create nested commit for root module --- CHANGES.md | 1 - internal/actions/cmd/updateall/main.go | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3506f7fb1a8c..cadee56d3b39 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,7 +5,6 @@ ### Bug Fixes -* **/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)) * **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)) * **internal/aliasgen:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) * **internal/examples/fake:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) diff --git a/internal/actions/cmd/updateall/main.go b/internal/actions/cmd/updateall/main.go index f882387cd457..2338c249719f 100644 --- a/internal/actions/cmd/updateall/main.go +++ b/internal/actions/cmd/updateall/main.go @@ -135,8 +135,9 @@ func update(modDir, dep, version, rootDir string) error { } if !*quiet { - scope := strings.TrimPrefix(strings.TrimSpace(modDir), rootDir+"/") - if scope == "" || scope == "main" || strings.Contains(scope, "internal/") { + modDir = strings.TrimSpace(modDir) + scope := strings.TrimPrefix(modDir, rootDir+"/") + if scope == modDir || scope == "" || scope == "main" || strings.Contains(scope, "internal/") { return nil } nestedCommits.WriteString("BEGIN_NESTED_COMMIT\n")