From 490f1d6184dc7a2eaf0bb0735502fab685abf9d9 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Wed, 8 Jun 2022 21:18:26 +0200 Subject: [PATCH] NEW FEATURE: Add deprecation notice to create-domains command (#1529) --- commands/createDomains.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/commands/createDomains.go b/commands/createDomains.go index 6c70187de..56c2e7c45 100644 --- a/commands/createDomains.go +++ b/commands/createDomains.go @@ -2,21 +2,26 @@ package commands import ( "fmt" + "github.com/urfave/cli/v2" "github.com/StackExchange/dnscontrol/v3/pkg/credsfile" "github.com/StackExchange/dnscontrol/v3/providers" - "github.com/urfave/cli/v2" ) var _ = cmd(catUtils, func() *cli.Command { var args CreateDomainsArgs return &cli.Command{ Name: "create-domains", - Usage: "Ensures that all domains in your configuration are activated at their Domain Service Provider (This does not purchase the domain or otherwise interact with Registrars.)", + Usage: "DEPRECATED: Ensures that all domains in your configuration are activated at their Domain Service Provider (This does not purchase the domain or otherwise interact with Registrars.)", Action: func(ctx *cli.Context) error { return exit(CreateDomains(args)) }, Flags: args.flags(), + Before: func(context *cli.Context) error { + fmt.Println("DEPRECATED: This command is deprecated. The domain is automatically created at the Domain Service Provider during the push command.") + fmt.Println("DEPRECATED: To prevent disable auto-creating, use --no-populate with the push command.") + return nil + }, } }())