X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0561bd0c3c07257fd58ded6c7cfa5feeae97af57..c371555926e3f361497b2bb1c9531fcaf7283ed4:/tools/keep-rsync/keep-rsync.go diff --git a/tools/keep-rsync/keep-rsync.go b/tools/keep-rsync/keep-rsync.go index a299d17feb..303f71f8fe 100644 --- a/tools/keep-rsync/keep-rsync.go +++ b/tools/keep-rsync/keep-rsync.go @@ -21,6 +21,8 @@ import ( "git.curoverse.com/arvados.git/sdk/go/keepclient" ) +var version = "dev" + func main() { err := doMain() if err != nil { @@ -69,9 +71,20 @@ func doMain() error { 0, "Lifetime of blob permission signatures on source keepservers. If not provided, this will be retrieved from the API server's discovery document.") + getVersion := flags.Bool( + "version", + false, + "Print version information and exit.") + // Parse args; omit the first arg which is the command name flags.Parse(os.Args[1:]) + // Print version information if requested + if *getVersion { + fmt.Printf("keep-rsync %s\n", version) + os.Exit(0) + } + srcConfig, srcBlobSigningKey, err := loadConfig(*srcConfigFile) if err != nil { return fmt.Errorf("Error loading src configuration from file: %s", err.Error())