Skip to content

Commit

Permalink
fix: [StyraInc#1275] Return version if regal installed using go install
Browse files Browse the repository at this point in the history
  • Loading branch information
sbp-bvanb committed Nov 25, 2024
1 parent 34ba147 commit 55d2e23
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
.vscode

dist/

Expand Down
26 changes: 22 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,26 @@
"OPA_CHECK_CAPABILITIES": "${workspacePath}/build/capabilities.json",
"OPA_EVAL_CAPABILITIES": "${workspacePath}/build/capabilities.json"
},
"opa.roots": [
"${workspaceFolder}/bundle"
],
"opa.strictMode": true
"opa.roots": ["${workspaceFolder}/bundle"],
"opa.strictMode": true,
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#3399ff",
"activityBar.background": "#3399ff",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#bf0060",
"activityBarBadge.foreground": "#e7e7e7",
"commandCenter.border": "#e7e7e799",
"sash.hoverBorder": "#3399ff",
"statusBar.background": "#007fff",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#3399ff",
"statusBarItem.remoteBackground": "#007fff",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#007fff",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#007fff99",
"titleBar.inactiveForeground": "#e7e7e799"
},
"peacock.color": "#007fff"
}
10 changes: 9 additions & 1 deletion pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (vi Info) String() string {

func New() Info {
return Info{
Version: unknownString(Version),
Version: unknownVersionString(Version),
GoVersion: goVersion,
Platform: platform,
Commit: unknownString(Commit),
Expand All @@ -67,3 +67,11 @@ func unknownString(s string) string {

return s
}

func unknownVersionString(s string) string {
if s == "" {
return "v.29.3"
}

return s
}

0 comments on commit 55d2e23

Please sign in to comment.