From b040d9493c1b459f9394e89b177d83c907306f95 Mon Sep 17 00:00:00 2001 From: Doria Keung Date: Tue, 8 Oct 2024 14:55:30 -0400 Subject: [PATCH] Provide clearer instructions in buf push deprecation messages (#3390) --- private/buf/cmd/buf/command/push/push.go | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/private/buf/cmd/buf/command/push/push.go b/private/buf/cmd/buf/command/push/push.go index a16dc87ea8..49ef16c5ea 100644 --- a/private/buf/cmd/buf/command/push/push.go +++ b/private/buf/cmd/buf/command/push/push.go @@ -177,14 +177,32 @@ If you set the --%s flag and/or --%s flag yourself, then the value(s) will be us flagSet.StringSliceVarP(&f.Tags, tagFlagName, tagFlagShortName, nil, useLabelInstead) _ = flagSet.MarkHidden(tagFlagName) _ = flagSet.MarkHidden(tagFlagShortName) - _ = flagSet.MarkDeprecated(tagFlagName, useLabelInstead) + _ = flagSet.MarkDeprecated( + tagFlagName, + fmt.Sprintf( + `%s Replace "buf push --tag " with "buf push --label --label " ( and are equivalent in this case). +You can also use "buf registry commit add-label --label