summaryrefslogtreecommitdiffstats
path: root/pkg/commands/tags.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-09-29 20:03:39 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-09-29 20:48:49 +1000
commit72af7e41778bca93d82fa668641f515fba1d92bc (patch)
tree7e755e857be72205ee99641d5eb5d4556151ad8f /pkg/commands/tags.go
parent1767f91047a35318f6b1e469199c8a7f547f2afc (diff)
factor out code from git.go
Diffstat (limited to 'pkg/commands/tags.go')
-rw-r--r--pkg/commands/tags.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/commands/tags.go b/pkg/commands/tags.go
new file mode 100644
index 000000000..f7b26d8df
--- /dev/null
+++ b/pkg/commands/tags.go
@@ -0,0 +1,13 @@
+package commands
+
+func (c *GitCommand) CreateLightweightTag(tagName string, commitSha string) error {
+ return c.OSCommand.RunCommand("git tag %s %s", tagName, commitSha)
+}
+
+func (c *GitCommand) DeleteTag(tagName string) error {
+ return c.OSCommand.RunCommand("git tag -d %s", tagName)
+}
+
+func (c *GitCommand) PushTag(remoteName string, tagName string) error {
+ return c.OSCommand.RunCommand("git push %s %s", remoteName, tagName)
+}