Skip to content

Commit

Permalink
fix tag/untag
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Oct 4, 2024
1 parent 6ad1978 commit 9827706
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions cmd/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ func tagRun(cmd *cobra.Command, args []string) error {
}

// update tag
release.Tag = &args[0]

release = &keygenext.Release{
ID: release.ID,
Tag: &args[0],
}
if err := release.Update(); err != nil {
if e, ok := err.(*keygenext.Error); ok {
var code string
Expand Down
6 changes: 4 additions & 2 deletions cmd/untag.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ func untagRun(cmd *cobra.Command, args []string) error {
}

// remove tag
release.Tag = nil

release = &keygenext.Release{
ID: release.ID,
Tag: nil,
}
if err := release.Update(); err != nil {
if e, ok := err.(*keygenext.Error); ok {
var code string
Expand Down

0 comments on commit 9827706

Please sign in to comment.