Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Version during build process #374

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
)

var logger = lib.InitLogger()
var version = "0.12.0"
var version *string
MatrixCrawler marked this conversation as resolved.
Show resolved Hide resolved

func main() {
dir := lib.GetCurrentDirectory()
Expand Down Expand Up @@ -89,7 +89,11 @@
switch {
case *versionFlag:
//if *versionFlag {
logger.Infof("Version: %s", version)
if version != nil {
fmt.Printf("Version: %s\n", version)

Check failure on line 93 in main.go

View workflow job for this annotation

GitHub Actions / integration_tests_linux (ubuntu-latest, 1.22)

fmt.Printf format %s has arg version of wrong type *string

Check failure on line 93 in main.go

View workflow job for this annotation

GitHub Actions / fmt_and_vet

fmt.Printf format %s has arg version of wrong type *string

Check failure on line 93 in main.go

View workflow job for this annotation

GitHub Actions / integration_tests_windows (windows-latest, 1.22)

fmt.Printf format %s has arg version of wrong type *string
} else {
fmt.Println("Version not defined during build.")
}
case *helpFlag:
//} else if *helpFlag {
usageMessage()
Expand Down
Loading