As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Unverified Commit 5da77e27 authored by Ash McKenzie's avatar Ash McKenzie
Browse files

Consistently respond to -version

parent d9dd54be
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -3,6 +3,7 @@ package main
import (
"fmt"
"os"
"path"
checkCmd "gitlab.com/gitlab-org/gitlab-shell/v14/cmd/check/command"
"gitlab.com/gitlab-org/gitlab-shell/v14/internal/command"
Loading
Loading
@@ -23,7 +24,7 @@ func main() {
// We can't use the flag library because gitlab-shell receives other arguments
// that confuse the parser.
if len(os.Args) == 2 && os.Args[1] == "-version" {
fmt.Printf("check %s-%s\n", Version, BuildTime)
fmt.Printf("%s %s-%s\n", path.Base(os.Args[0]), Version, BuildTime)
os.Exit(0)
}
Loading
Loading
Loading
Loading
@@ -3,6 +3,7 @@ package main
import (
"fmt"
"os"
"path"
cmd "gitlab.com/gitlab-org/gitlab-shell/v14/cmd/gitlab-shell-authorized-keys-check/command"
"gitlab.com/gitlab-org/gitlab-shell/v14/internal/command"
Loading
Loading
@@ -24,7 +25,7 @@ func main() {
// We can't use the flag library because gitlab-shell receives other arguments
// that confuse the parser.
if len(os.Args) == 2 && os.Args[1] == "-version" {
fmt.Printf("gitlab-shell %s-%s\n", Version, BuildTime)
fmt.Printf("%s %s-%s\n", path.Base(os.Args[0]), Version, BuildTime)
os.Exit(0)
}
Loading
Loading
Loading
Loading
@@ -3,6 +3,7 @@ package main
import (
"fmt"
"os"
"path"
cmd "gitlab.com/gitlab-org/gitlab-shell/v14/cmd/gitlab-shell-authorized-principals-check/command"
"gitlab.com/gitlab-org/gitlab-shell/v14/internal/command"
Loading
Loading
@@ -24,7 +25,7 @@ func main() {
// We can't use the flag library because gitlab-shell receives other arguments
// that confuse the parser.
if len(os.Args) == 2 && os.Args[1] == "-version" {
fmt.Printf("gitlab-shell %s-%s\n", Version, BuildTime)
fmt.Printf("%s %s-%s\n", path.Base(os.Args[0]), Version, BuildTime)
os.Exit(0)
}
Loading
Loading
Loading
Loading
@@ -3,6 +3,7 @@ package main
import (
"fmt"
"os"
"path"
"reflect"
grpccodes "google.golang.org/grpc/codes"
Loading
Loading
@@ -32,7 +33,7 @@ func main() {
// We can't use the flag library because gitlab-shell receives other arguments
// that confuse the parser.
if len(os.Args) == 2 && os.Args[1] == "-version" {
fmt.Printf("gitlab-shell %s-%s\n", Version, BuildTime)
fmt.Printf("%s %s-%s\n", path.Base(os.Args[0]), Version, BuildTime)
os.Exit(0)
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment