Skip to content
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

multimod: Fix to log 'Using versioning file' and 'Successfully deleted module tags' to stderr instead of stdout #507

Merged
merged 4 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
16 changes: 16 additions & 0 deletions .chloggen/multimod-print-using-to-stderr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. crosslink)
component: multimod

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Fix to log 'Using versioning file' to stderr instead of stdout

# One or more tracking issues related to the change
issues: [507]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ REMOTE?=git@github.com:open-telemetry/opentelemetry-go-build-tools.git
.PHONY: push-tags
push-tags: | $(MULTIMOD)
$(MULTIMOD) verify
set -e; for tag in `$(MULTIMOD) tag -m tools -c ${COMMIT} --print-tags | grep -v "Using" `; do \
set -e; for tag in `$(MULTIMOD) tag -m tools -c ${COMMIT} --print-tags ; do \
echo "pushing tag $${tag}"; \
git push ${REMOTE} $${tag}; \
done;
Expand Down
3 changes: 1 addition & 2 deletions multimod/cmd/prerelease.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package cmd

import (
"fmt"
"log"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -55,7 +54,7 @@ var prereleaseCmd = &cobra.Command{
}
},
Run: func(*cobra.Command, []string) {
fmt.Println("Using versioning file", versioningFile)
log.Println("Using versioning file", versioningFile)
MrAlias marked this conversation as resolved.
Show resolved Hide resolved

prerelease.Run(versioningFile, moduleSetNames, allModuleSets, skipGoModTidy, commitToDifferentBranch)
},
Expand Down
2 changes: 1 addition & 1 deletion multimod/cmd/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var syncCmd = &cobra.Command{
}
},
Run: func(*cobra.Command, []string) {
fmt.Println("Using versioning file", versioningFile)
log.Println("Using versioning file", versioningFile)

if otherVersioningFile == "" {
otherVersioningFile = filepath.Join(otherRepoRoot,
Expand Down
3 changes: 1 addition & 2 deletions multimod/cmd/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package cmd

import (
"fmt"
"log"

"github.com/spf13/cobra"
Expand All @@ -38,7 +37,7 @@ var tagCmd = &cobra.Command{
- Creates new Git tags for all modules being updated.
- If tagging fails in the middle of the script, the recently created tags will be deleted.`,
Run: func(*cobra.Command, []string) {
fmt.Println("Using versioning file", versioningFile)
log.Println("Using versioning file", versioningFile)

tag.Run(versioningFile, moduleSetName, commitHash, deleteModuleSetTags, printTags)
},
Expand Down
3 changes: 1 addition & 2 deletions multimod/cmd/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package cmd

import (
"fmt"
"log"

"github.com/spf13/cobra"
Expand All @@ -34,7 +33,7 @@ var verifyCmd = &cobra.Command{
- Script warns if any stable modules depend on any unstable modules.
`,
Run: func(*cobra.Command, []string) {
fmt.Println("Using versioning file", versioningFile)
log.Println("Using versioning file", versioningFile)

verify.Run(versioningFile)
},
Expand Down
Loading