File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
internal/osbuilder/cmd/version Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ require (
1818 github.com/goreleaser/fileglob v1.4.0
1919 github.com/joho/godotenv v1.5.1
2020 github.com/olekukonko/tablewriter v0.0.5
21- github.com/onexstack/onexstack v0.3.1-rc.1
21+ github.com/onexstack/onexstack v0.3.1-rc.2
2222 github.com/purpleclay/gitz v0.11.2
2323 github.com/rakyll/statik v0.1.7
2424 github.com/shirou/gopsutil/v3 v3.23.6
@@ -181,3 +181,5 @@ require (
181181 sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
182182 sigs.k8s.io/yaml v1.4.0 // indirect
183183)
184+
185+ replace github.com/onexstack/onexstack => /home/colin/workspace/golang/src/github.com/onexstack/onexstack
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ import (
2121 cmdutil "github.com/onexstack/osbuilder/internal/osbuilder/cmd/util"
2222)
2323
24+ const currentModule = "github.com/onexstack/osbuilder"
25+
2426// Version is a struct for version information.
2527type Version struct {
2628 ClientVersion * version.Info `json:"clientVersion,omitempty" yaml:"clientVersion,omitempty"`
@@ -89,7 +91,10 @@ func (o *Options) Run() error {
8991 versionInfo Version
9092 )
9193
92- clientVersion := version .GetFromDebugInfo ()
94+ clientVersion := version .Get ()
95+ if clientVersion .GitVersion == "" {
96+ clientVersion = version .GetFromDebugInfo (currentModule )
97+ }
9398
9499 switch o .Output {
95100 case "" :
You can’t perform that action at this time.
0 commit comments