This commit is contained in:
7
main.go
7
main.go
@@ -2,17 +2,20 @@ package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"gitea.layla.gg/layla/gsquash/git"
|
||||
)
|
||||
|
||||
var Version string = "0.0.1"
|
||||
|
||||
func main() {
|
||||
// Set flags
|
||||
flagset := flag.NewFlagSet("git", flag.ExitOnError)
|
||||
pull := flagset.Bool("pull", false, "Pull the latest changes from the remote")
|
||||
message := flagset.String("m", "", "The commit message")
|
||||
version := flagset.Bool("version", false, "Print the version")
|
||||
version := flagset.Bool("v", false, "Print the version")
|
||||
help := flagset.Bool("h", false, "Print the help")
|
||||
|
||||
// Parse flags
|
||||
@@ -20,7 +23,7 @@ func main() {
|
||||
|
||||
// Print version
|
||||
if *version {
|
||||
println("gsquash v0.0.1")
|
||||
fmt.Printf("gsquash version %s\n", Version)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user