Skip to content

Commit

Permalink
Merge pull request #53 from grisu48/version
Browse files Browse the repository at this point in the history
Add version and make them consistent
  • Loading branch information
grisu48 authored Apr 5, 2023
2 parents 9149009 + 1d12def commit 8564b24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions cmd/pasta/pasta.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import (
"github.com/BurntSushi/toml"
)

const VERSION = "0.7"

type Config struct {
RemoteHost string `toml:"RemoteHost"`
RemoteHosts []RemoteHost `toml:"Remote"`
Expand Down Expand Up @@ -73,6 +75,7 @@ func usage() {
fmt.Println("")
fmt.Println(" --ls, --list List known pasta pushes")
fmt.Println(" --gc Garbage collector (clean expired pastas)")
fmt.Println(" --version Show client version")
fmt.Println("")
fmt.Println("One or more files can be pushed to the server.")
fmt.Println("If no file is given, the input from stdin will be pushed.")
Expand Down Expand Up @@ -196,6 +199,9 @@ func main() {
action = "rm"
} else if arg == "--gc" {
action = "gc"
} else if arg == "--version" {
fmt.Printf("pasta version %s\n", VERSION)
os.Exit(1)
} else if arg == "--" {
// The rest are filenames
if i+1 < len(args) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/pastad/pastad.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/akamensky/argparse"
)

const VERSION = "0.2"
const VERSION = "0.7"

var cf Config
var bowl PastaBowl
Expand Down

0 comments on commit 8564b24

Please sign in to comment.