enhance(installer): use ldflags to inject versions #232

Closed
opened 2026-04-05 17:03:03 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @LaurenceJJones on 2/18/2026

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

Instead of the CI/CD using sed to replace the 'replaceme' text we can instead use ldflags which can inject variables at build time to the versions. The makefile had a bunch of workarounds for dev so these have been removed to cleanup etc etc and fetchs versions from the gh api directly if the variables are not injected like the CI/CD does

How to test?

Using make or explicit make go-build-release PANGOLIN_VERSION=1.15.4 GERBIL_VERSION=1.0.0 BADGER_VERSION=1.0.0 will inject the variables into the binary without using sed

*Originally created by @LaurenceJJones on 2/18/2026* ## Community Contribution License Agreement By creating this pull request, I grant the project maintainers an unlimited, perpetual license to use, modify, and redistribute these contributions under any terms they choose, including both the AGPLv3 and the Fossorial Commercial license terms. I represent that I have the right to grant this license for all contributed content. ## Description Instead of the CI/CD using sed to replace the 'replaceme' text we can instead use ldflags which can inject variables at build time to the versions. The makefile had a bunch of workarounds for dev so these have been removed to cleanup etc etc and fetchs versions from the gh api directly if the variables are not injected like the CI/CD does ## How to test? Using `make` or explicit `make go-build-release PANGOLIN_VERSION=1.15.4 GERBIL_VERSION=1.0.0 BADGER_VERSION=1.0.0` will inject the variables into the binary without using `sed`
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#232