diff --git a/build/archlinux/PKGBUILD b/build/archlinux/PKGBUILD index 108abbe..a1831f6 100644 --- a/build/archlinux/PKGBUILD +++ b/build/archlinux/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Alexander "Arav" Andreev pkgname=dwelling-upload-git -pkgver=1.0.0 +pkgver=22.13.0 pkgrel=1 pkgdesc="Arav's Dwelling / Upload" arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') diff --git a/cmd/dwelling-upload-clean/main.go b/cmd/dwelling-upload-clean/main.go index ce54abd..b2dfd91 100644 --- a/cmd/dwelling-upload-clean/main.go +++ b/cmd/dwelling-upload-clean/main.go @@ -5,6 +5,7 @@ import ( "dwelling-upload/pkg/logging" "dwelling-upload/pkg/utils" "flag" + "fmt" "io/ioutil" "log" "os" @@ -14,10 +15,16 @@ import ( var configPath *string = flag.String("conf", "config.yaml", "path to configuration file") var logToStdout *bool = flag.Bool("log-stdout", false, "write logs to stdout") +var showVersion *bool = flag.Bool("v", false, "show version") func main() { flag.Parse() + if *showVersion { + fmt.Println("dwelling-upload-clean Ver. 22.13.0\nCopyright (c) 2022 Alexander \"Arav\" Andreev ") + return + } + config, err := configuration.LoadConfiguration(*configPath) if err != nil { log.Fatalln(err) diff --git a/cmd/dwelling-upload/main.go b/cmd/dwelling-upload/main.go index ae08f68..a4db3d7 100644 --- a/cmd/dwelling-upload/main.go +++ b/cmd/dwelling-upload/main.go @@ -8,6 +8,7 @@ import ( "dwelling-upload/pkg/utils" "dwelling-upload/pkg/watcher" "flag" + "fmt" "log" "os" "os/signal" @@ -16,10 +17,16 @@ import ( var configPath *string = flag.String("conf", "config.yaml", "path to configuration file") var logToStdout *bool = flag.Bool("log-stdout", false, "write logs to stdout") +var showVersion *bool = flag.Bool("v", false, "show version") func main() { flag.Parse() + if *showVersion { + fmt.Println("dwelling-upload Ver. 22.13.0\nCopyright (c) 2022 Alexander \"Arav\" Andreev ") + return + } + config, err := configuration.LoadConfiguration(*configPath) if err != nil { log.Fatalln(err)