Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
website: don't use brackets
Browse files Browse the repository at this point in the history
This commit changes the default value to not include brackets. This was
causing Vercel to fail because it tried to render `<timestamp>` as an
html tag.
  • Loading branch information
briancain committed Jun 28, 2022
1 parent 902b7d7 commit cd20a93
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions internal/cli/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func (c *InstallCommand) Run(args []string) int {
serverclient.StaticToken(contextConfig.Server.AuthToken)))

// This is our default, so let's actually set the timestamp.
if c.contextName == "install-<timestamp>" || c.contextName == "" {
if c.contextName == "install-timestamp" || c.contextName == "" {
c.contextName = fmt.Sprintf("install-%d", time.Now().Unix())
}

Expand Down Expand Up @@ -364,7 +364,7 @@ func (c *InstallCommand) Flags() *flag.Sets {
f.StringVar(&flag.StringVar{
Name: "context-create",
Target: &c.contextName,
Default: "install-<timestamp>",
Default: "install-timestamp",
Usage: "Create a context with connection information for this installation. " +
"The default value will be suffixed with a timestamp at the time the command is executed.",
})
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/server_bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (c *ServerBootstrapCommand) Run(args []string) int {
// specifically sets the flag to empty string. Our flag package will set
// the default here, which will never be emptry string
return 0
} else if c.flagContext == "bootstrap-<timestamp>" {
} else if c.flagContext == "bootstrap-timestamp" {
c.flagContext = fmt.Sprintf("bootstrap-%d", time.Now().Unix())
}

Expand Down Expand Up @@ -105,7 +105,7 @@ func (c *ServerBootstrapCommand) Flags() *flag.Sets {
Usage: "Create a CLI context for this bootstrapped server. The context name " +
"will be the value of this flag. If this is an empty string, a context will " +
"not be created",
Default: "bootstrap-<timestamp>",
Default: "bootstrap-timestamp",
})

f.BoolVar(&flag.BoolVar{
Expand Down
2 changes: 1 addition & 1 deletion website/content/commands/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ and disable the UI, the command would be:
#### Command Options

- `-accept-tos` - Pass to accept the Terms of Service and Privacy Policy to use the Waypoint URL Service. This is required if the URL service is enabled and you're using the HashiCorp-provided URL service rather than self-hosting. See the privacy policy at https://hashicorp.com/privacy and the ToS at https://waypointproject.io/terms. The default is false.
- `-context-create=<string>` - Create a context with connection information for this installation. The default value will be suffixed with a timestamp at the time the command is executed. The default is install-<timestamp>.
- `-context-create=<string>` - Create a context with connection information for this installation. The default value will be suffixed with a timestamp at the time the command is executed. The default is install-timestamp.
- `-context-set-default` - Set the newly installed server as the default CLI context. The default is true.
- `-platform=<string>` - Platform to install the Waypoint server into.

Expand Down
2 changes: 1 addition & 1 deletion website/content/commands/server-bootstrap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ a CLI context by default.

#### Command Options

- `-context-create=<string>` - Create a CLI context for this bootstrapped server. The context name will be the value of this flag. If this is an empty string, a context will not be created. The default is bootstrap-<timestamp>.
- `-context-create=<string>` - Create a CLI context for this bootstrapped server. The context name will be the value of this flag. If this is an empty string, a context will not be created. The default is bootstrap-timestamp.
- `-context-set-default` - Set the newly bootstrapped server as the default CLI context. This only has an effect if -context-create is non-empty. The default is true.

@include "commands/server-bootstrap_more.mdx"
2 changes: 1 addition & 1 deletion website/content/commands/server-install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ and disable the UI, the command would be:
#### Command Options

- `-accept-tos` - Pass to accept the Terms of Service and Privacy Policy to use the Waypoint URL Service. This is required if the URL service is enabled and you're using the HashiCorp-provided URL service rather than self-hosting. See the privacy policy at https://hashicorp.com/privacy and the ToS at https://waypointproject.io/terms. The default is false.
- `-context-create=<string>` - Create a context with connection information for this installation. The default value will be suffixed with a timestamp at the time the command is executed. The default is install-<timestamp>.
- `-context-create=<string>` - Create a context with connection information for this installation. The default value will be suffixed with a timestamp at the time the command is executed. The default is install-timestamp.
- `-context-set-default` - Set the newly installed server as the default CLI context. The default is true.
- `-platform=<string>` - Platform to install the Waypoint server into.

Expand Down

0 comments on commit cd20a93

Please sign in to comment.