- 10 Mar, 2022 4 commits
-
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-
- 29 Nov, 2021 12 commits
-
-
dominik.rimpf authored
-
dominik.rimpf authored
-
-
-
dominik.rimpf authored
-
dominik.rimpf authored
-
-
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-
- 09 Nov, 2021 1 commit
-
-
heiko.reese authored
-
- 23 Sep, 2021 1 commit
-
-
heiko.reese authored
-
- 14 Sep, 2021 22 commits
-
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
this closes #14
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
this closes #13
-
dominik.rimpf authored
-
diff --git a/cmd/certbot_netvs_hooks/certbot_netvs_auth_hook/main.go b/cmd/certbot_netvs_hooks/certbot_netvs_auth_hook/main.go index d9a3934..cb94bff 100644 --- a/cmd/certbot_netvs_hooks/certbot_netvs_auth_hook/main.go +++ b/cmd/certbot_netvs_hooks/certbot_netvs_auth_hook/main.go @@ -2,12 +2,12 @@ package main import ( "fmt" - "log" - "os" - "git.scc.kit.edu/KIT-CA/acme4netvs/v2" "github.com/k0kubun/pp" flag "github.com/spf13/pflag" + "log" + "os" + "path" ) var ( @@ -21,13 +21,21 @@ var ( apiClient *acme4netvs.NETVSClient ) +// goreleaser variables +var ( + version string = "unknown" + commit string = "unknown" + date string = "unknown" + builtBy string = "unknown" +) + func init() { var err error // custom help message flag.Usage = func() { - fmt.Fprint(os.Stderr, "This is usually called directly by certbot:\n\n") - fmt.Fprintf(os.Stderr, " %s [OPTIONS]\n\n", os.Args[0]) + fmt.Fprint(os.Stderr, "Usage (this is usually called directly by certbot):\n\n") + fmt.Fprintf(os.Stderr, " %s [OPTIONS]\n\n", path.Base(os.Args[0])) fmt.Fprint(os.Stderr, "OPTIONS:\n\n") flag.PrintDefaults() fmt.Fprint(os.Stderr, ` @@ -43,6 +51,7 @@ Optional environment variables: CERTBOT_ALL_DOMAINS: A comma-separated list of all domains challenged for the current certificate `) + fmt.Fprintf(os.Stderr, "Version %s build on %s (commit %s)\n", version, date, commit) fmt.Fprintln(os.Stderr, acme4netvs.RELEASE_URL_TEXT) os.Exit(0) } diff --git a/cmd/certbot_netvs_hooks/certbot_netvs_cleanup_hook/main.go b/cmd/certbot_netvs_hooks/certbot_netvs_cleanup_hook/main.go index 5983207..8df40b5 100644 --- a/cmd/certbot_netvs_hooks/certbot_netvs_cleanup_hook/main.go +++ b/cmd/certbot_netvs_hooks/certbot_netvs_cleanup_hook/main.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "os" + "path" "git.scc.kit.edu/KIT-CA/acme4netvs/v2" "github.com/k0kubun/pp" @@ -21,13 +22,21 @@ var ( apiClient *acme4netvs.NETVSClient ) +// goreleaser variables +var ( + version string = "unknown" + commit string = "unknown" + date string = "unknown" + builtBy string = "unknown" +) + func init() { var err error // custom help message flag.Usage = func() { - fmt.Fprint(os.Stderr, "This is usually called directly by certbot:\n\n") - fmt.Fprintf(os.Stderr, " %s [OPTIONS]\n\n", os.Args[0]) + fmt.Fprint(os.Stderr, "Usage (this is usually called directly by certbot):\n\n") + fmt.Fprintf(os.Stderr, " %s [OPTIONS]\n\n", path.Base(os.Args[0])) fmt.Fprint(os.Stderr, "OPTIONS:\n\n") flag.PrintDefaults() fmt.Fprint(os.Stderr, ` @@ -44,6 +53,7 @@ Optional environment variables: CERTBOT_AUTH_OUTPUT: Whatever the auth script wrote to stdout `) + fmt.Fprintf(os.Stderr, "Version %s build on %s (commit %s)\n", version, date, commit) fmt.Fprintln(os.Stderr, acme4netvs.RELEASE_URL_TEXT) os.Exit(0) } diff --git a/cmd/dehydrated_netvs_hook/main.go b/cmd/dehydrated_netvs_hook/main.go index ec3aa7a..d13e11e 100644 --- a/cmd/dehydrated_netvs_hook/main.go +++ b/cmd/dehydrated_netvs_hook/main.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "os" + "path" flag "github.com/spf13/pflag" @@ -19,15 +20,25 @@ var ( apiClient *acme4netvs.NETVSClient ) +// goreleaser variables +var ( + version string = "unknown" + commit string = "unknown" + date string = "unknown" + builtBy string = "unknown" +) + func init() { var err error // custom help message flag.Usage = func() { - fmt.Fprint(os.Stderr, "This is usually called directly by dehydrated:\n\n") - fmt.Fprintf(os.Stderr, " %s [OPTIONS] OPERATION DOMAIN CHALLENGE_TOKEN DNS-01-TOKEN\n\n", os.Args[0]) + fmt.Fprint(os.Stderr, "Usage (this is usually called directly by certbot):\n\n") + fmt.Fprintf(os.Stderr, " %s [OPTIONS] OPERATION DOMAIN CHALLENGE_TOKEN DNS-01-TOKEN\n\n", path.Base(os.Args[0])) fmt.Fprint(os.Stderr, "OPTIONS:\n\n") flag.PrintDefaults() + fmt.Fprintln(os.Stderr, "") + fmt.Fprintf(os.Stderr, "Version %s build on %s (commit %s)\n", version, date, commit) fmt.Fprintln(os.Stderr, acme4netvs.RELEASE_URL_TEXT) os.Exit(0) }
-
-
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-
dominik.rimpf authored
-