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

Add version info to Windows executable. #417

Merged
merged 15 commits into from
Dec 6, 2021

Conversation

malcyon
Copy link
Contributor

@malcyon malcyon commented Nov 23, 2021

Adds version info to graylog-sidecar Windows executable using goversioninfo

Fixes #359

@malcyon malcyon marked this pull request as draft November 23, 2021 21:58
@malcyon
Copy link
Contributor Author

malcyon commented Nov 23, 2021

Seems to work fine if I run make build-windows32.

image

@malcyon malcyon requested a review from bernd November 23, 2021 22:03
@bernd bernd requested review from mpfz0r and removed request for bernd November 24, 2021 08:09
@malcyon
Copy link
Contributor Author

malcyon commented Nov 24, 2021

Tested successfully on a Windows 10 VM, using the EXE from the Jenkins build:

image

@malcyon malcyon marked this pull request as ready for review November 24, 2021 15:38
@malcyon malcyon marked this pull request as draft November 24, 2021 15:39
@malcyon
Copy link
Contributor Author

malcyon commented Nov 24, 2021

Just need to do something with versioninfo.json, so that we don't have to update the version in multiple places with each release.

@malcyon
Copy link
Contributor Author

malcyon commented Nov 24, 2021

Here is what it looks like using the command line flags instead of the json file:

image

@malcyon malcyon marked this pull request as ready for review November 24, 2021 16:07
@malcyon malcyon marked this pull request as draft November 24, 2021 16:43
@malcyon malcyon marked this pull request as ready for review November 24, 2021 19:41
@mpfz0r mpfz0r self-assigned this Nov 30, 2021
GOOS=windows GOARCH=386 CGO_ENABLED=1 CC=i686-w64-mingw32-gcc $(GO) build $(BUILD_OPTS) -pkgdir $(GOPATH)/go_win32 -v -i -o build/$(COLLECTOR_VERSION)/windows/386/graylog-sidecar.exe

## Adds version info to Windows executable
install-goversioninfo:
go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only works with go1.16 and above.
But I can live with that.

https://go.dev/doc/go1.16#go-command

Copy link
Contributor

@mpfz0r mpfz0r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@malcyon malcyon merged commit ffa05b3 into master Dec 6, 2021
@malcyon malcyon deleted the feature/windows-exe-version-info branch December 6, 2021 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing version number in executable
3 participants