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

Add example for lakectl tag create command #2902

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 4 additions & 3 deletions cmd/lakectl/cmd/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ var tagListCmd = &cobra.Command{
}

var tagCreateCmd = &cobra.Command{
Use: "create <tag uri> <commit ref>",
Short: "Create a new tag in a repository",
Args: cobra.ExactArgs(tagCreateRequiredArgs),
Use: "create <tag uri> <commit ref>",
Short: "Create a new tag in a repository",
Example: "lakectl tag create lakefs://example-repo/example-tag 2397cc9a9d04c20a4e5739b42c1dd3d8ba655c0b3a3b974850895a13d8bf9917",
Args: cobra.ExactArgs(tagCreateRequiredArgs),
Run: func(cmd *cobra.Command, args []string) {
tagURI := MustParseRefURI("tag", args[0])
Fmt("Tag ref: %s\n", tagURI.String())
Expand Down
7 changes: 7 additions & 0 deletions docs/reference/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -2541,6 +2541,13 @@ Create a new tag in a repository
lakectl tag create <tag uri> <commit ref> [flags]
```

#### Examples
{:.no_toc}

```
lakectl tag create lakefs://example-repo/example-tag 2397cc9a9d04c20a4e5739b42c1dd3d8ba655c0b3a3b974850895a13d8bf9917
```

#### Options
{:.no_toc}

Expand Down