We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 406d305 commit 2f3161bCopy full SHA for 2f3161b
cmd/tfplugingen-openapi/main.go
@@ -4,6 +4,7 @@
4
package main
5
6
import (
7
+ "fmt"
8
"io"
9
"os"
10
"runtime/debug"
@@ -18,15 +19,18 @@ import (
18
19
// https://goreleaser.com/cookbooks/using-main.version/
20
func main() {
21
name := "tfplugingen-openapi"
- version := name + " commit: " + func() string {
22
+ version := name + func() string {
23
if info, ok := debug.ReadBuildInfo(); ok {
24
for _, setting := range info.Settings {
25
if setting.Key == "vcs.revision" {
- return setting.Value
26
+ return fmt.Sprintf(" commit: %s", setting.Value)
27
}
28
29
+
30
+ return fmt.Sprintf(" module: %s", info.Main.Version)
31
- return "local"
32
33
+ return " local"
34
}()
35
36
os.Exit(runCLI(
0 commit comments