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 product/file version in Windows executables #4811

Merged
merged 1 commit into from
Oct 8, 2023

Conversation

ResamVi
Copy link
Contributor

@ResamVi ResamVi commented Oct 6, 2023

Which problem is this PR solving?

This resolves #3414

Description of the changes

Add to the windows build step in Makefile to create a resource.syso using goversioninfo. The version is extracted from the latest git tag.

go build will embed this information in the final executable

image

(Forgive the German in this screenshot)

How was this change tested?

  1. Run make build-binaries-windows
  2. Navigate to the folder containing binaries (e.g. cmd/agent/agent-windows-amd64)
  3. Add .exe to the file name for the changes to be seen: agent-windows-amd64.exe

Ran other targets (make build-binaries-linux) to see if it broke other targets. Looked fine so far.

Notes

There is the hassle of creating a .syso file that must be in the same directory as the main.go file so there's a lot of copying to each cmd/*.

I tried to keep it centralized to a prepare-winres Makefile target and the files are cleaned up afterwards.

Checklist

@ResamVi ResamVi requested a review from a team as a code owner October 6, 2023 16:17
Makefile Outdated Show resolved Hide resolved
versioninfo.json Outdated Show resolved Hide resolved
versioninfo.json Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
versioninfo.json Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@ResamVi ResamVi force-pushed the main branch 4 times, most recently from 055f3d1 to 4bf3de4 Compare October 7, 2023 17:14
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 8, 2023

Codecov Report

All modified lines are covered by tests ✅

📢 Thoughts on this report? Let us know!.

@yurishkuro yurishkuro merged commit 14a6bc0 into jaegertracing:main Oct 8, 2023
31 checks passed
@yurishkuro
Copy link
Member

Thanks! 🎉

@yurishkuro yurishkuro added the changelog:new-feature Change that should be called out as new feature in CHANGELOG label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:new-feature Change that should be called out as new feature in CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Product/File version in Windows executables
2 participants