mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-10-18 09:46:53 +08:00
NEW FEATURE: Add deprecation notice to create-domains command (#1529)
This commit is contained in:
parent
c0450223c2
commit
490f1d6184
1 changed files with 7 additions and 2 deletions
|
@ -2,21 +2,26 @@ package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/urfave/cli/v2"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/credsfile"
|
"github.com/StackExchange/dnscontrol/v3/pkg/credsfile"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
"github.com/urfave/cli/v2"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = cmd(catUtils, func() *cli.Command {
|
var _ = cmd(catUtils, func() *cli.Command {
|
||||||
var args CreateDomainsArgs
|
var args CreateDomainsArgs
|
||||||
return &cli.Command{
|
return &cli.Command{
|
||||||
Name: "create-domains",
|
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 {
|
Action: func(ctx *cli.Context) error {
|
||||||
return exit(CreateDomains(args))
|
return exit(CreateDomains(args))
|
||||||
},
|
},
|
||||||
Flags: args.flags(),
|
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
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}())
|
}())
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue