summaryrefslogtreecommitdiff
path: root/doGit.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-30 19:16:16 -0500
committerJeff Carr <[email protected]>2025-10-30 19:16:16 -0500
commitdafb9c7028762f0c86499fc3fa557132064d37ec (patch)
treeac80ba738dc48006def47921802e504e89ff6bfd /doGit.go
parent53654740343a08b0df7027e144323750a9960eb7 (diff)
wrong git syntax. more work on publishing
Diffstat (limited to 'doGit.go')
-rw-r--r--doGit.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/doGit.go b/doGit.go
index b2eaae0..9d4712b 100644
--- a/doGit.go
+++ b/doGit.go
@@ -92,11 +92,21 @@ func doGit() (string, error) {
}
if argv.Git.ChopHEAD != 0 {
- cmd := []string{"git", "reset", "--hard", fmt.Sprintf("HEAD-%d", argv.Git.ChopHEAD)}
+ // tilde here, not a dash
+ cmd := []string{"git", "reset", "--hard", fmt.Sprintf("HEAD~%d", argv.Git.ChopHEAD)}
s, err = runCommand(cmd)
}
if argv.Git.Tag != nil {
+ if argv.Git.Tag.Delete != "" {
+ // git tag --delete v0.3
+ // git push --delete origin v0.3
+ cmd := []string{"git", "tag", "--delete", argv.Git.Tag.Delete}
+ shell.RunVerbose(cmd)
+ cmd = []string{"git", "push", "--delete", "origin", argv.Git.Tag.Delete}
+ shell.RunVerbose(cmd)
+ return "deleted tag", nil
+ }
cmd := []string{"git", "for-each-ref", "--sort=taggerdate", "--format"}
cmd = append(cmd, "%(tag)%00%(taggerdate:raw)%00%(taggername)%00%(subject)")
cmd = append(cmd, "refs/tags")