Skip to content

Commit

Permalink
chore: update pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h committed Oct 23, 2023
1 parent c0e01cf commit 78a6f93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.418-next
0.2.419
11 changes: 1 addition & 10 deletions increment-version/main.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package main

import (
"flag"
"fmt"
"log"
"os/exec"
"strings"
)

var fileFlag = flag.String("file", ".version", "Set the name of the file to modify")

func main() {
gitPath, err := exec.LookPath("git")
if err != nil {
Expand All @@ -23,11 +20,5 @@ func main() {
}
count := strings.TrimSpace(string(output))

var dirty string
cmd = exec.Command(gitPath, "diff", "--quiet")
if cmd.Run() != nil {
dirty = "-next"
}

fmt.Printf("0.2.%s%s", count, dirty)
fmt.Printf("0.2.%s", count)
}

0 comments on commit 78a6f93

Please sign in to comment.