@@ -29,7 +29,12 @@ var newTagCmd = &cobra.Command{
2929 Aliases : []string {"t" },
3030 Short : "Create a new tag for a specified project" ,
3131 Example : `# create tag from master branch for project groupx/myapp
32- gitlabctl new tag v2.0 --project=groupx/myapp --ref=master` ,
32+ gitlabctl new tag v2.0 --project=groupx/myapp --ref=master
33+
34+ # create a tag and create a release from it
35+ gitlabctl new tag v2.1 --project=groupx/myapp --ref=master --description="Released!"
36+
37+ # NOTE: You can also use 'gitlabctl new release' to create a release separately.` ,
3338 SilenceErrors : true ,
3439 SilenceUsage : true ,
3540 DisableAutoGenTag : true ,
@@ -49,7 +54,7 @@ func init() {
4954 newTagCmd .Flags ().StringP ("message" , "m" , "" ,
5055 "Creates annotated tag" )
5156 newTagCmd .Flags ().StringP ("description" , "d" , "" ,
52- "Add release notes to the git tag" )
57+ "Create a release from the git tag with the description as the release note " )
5358}
5459
5560func runNewTag (cmd * cobra.Command , tag string ) error {
@@ -66,7 +71,7 @@ func runNewTag(cmd *cobra.Command, tag string) error {
6671 return nil
6772}
6873
69- func newTag (project string , opts * gitlab.CreateTagOptions ) (* gitlab.Tag , error ) {
74+ func newTag (project string , opts * gitlab.CreateTagOptions ) (* gitlab.Tag , error ) {
7075 git , err := newGitlabClient ()
7176 if err != nil {
7277 return nil , err
0 commit comments