Stub temporary pm version

This commit is contained in:
Stephen McQuay 2018-03-02 23:23:18 -08:00
parent 97de548a26
commit 6ce1c4bdcb
Signed by: sm
GPG Key ID: 4E4B72F479BA3CE5

View File

@ -13,6 +13,8 @@ import (
"mcquay.me/pm/pkg" "mcquay.me/pm/pkg"
) )
const Version = "dev"
const usage = `pm: simple, cross-platform system package manager const usage = `pm: simple, cross-platform system package manager
subcommands: subcommands:
@ -22,6 +24,7 @@ subcommands:
package (pkg) -- create packages package (pkg) -- create packages
pull -- fetch all available packages from all configured remotes pull -- fetch all available packages from all configured remotes
remote -- configure remote pmd servers remote -- configure remote pmd servers
version (v) -- print version information
` `
const keyUsage = `pm keyring: interact with pm's OpenPGP keyring const keyUsage = `pm keyring: interact with pm's OpenPGP keyring
@ -219,6 +222,8 @@ func main() {
if err := db.ListAvailable(root, os.Stdout); err != nil { if err := db.ListAvailable(root, os.Stdout); err != nil {
fatalf("pulling available packages: %v\n", err) fatalf("pulling available packages: %v\n", err)
} }
case "version", "v":
fmt.Printf("pm: version %v\n", Version)
default: default:
fatalf("uknown subcommand %q\n\nusage: %v", cmd, usage) fatalf("uknown subcommand %q\n\nusage: %v", cmd, usage)
} }