feat(build): add Makefile with build, test, cross-compile, and man targets #192
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/ttheart!192
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/add-build-infrastructure"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Add build infrastructure with Makefile and man page:
make build— compile with version ldflag (#107)make test— run tests with race detector (#107)make install— install binary to/usr/local/bin(#107)make cross— cross-compile for linux/amd64 and linux/arm64 (#108)make vendor—go mod vendorfor reproducible builds (#110)make man— generate man page (#109)make clean— remove build artifactsman/man8/ttheart.8documenting options, signals, and filesWhy
Standardized build process. Supports dev, CI, packaging, and release workflows.
Testing
go test ./...and pre-commit passBreaking Changes
None.
Notes
make build VERSION=1.0.0ttheart-linux-amd64andttheart-linux-arm64buildtarget venders dependencies before compilingmake manCloses #111
Closes #107
Closes #108
Closes #109
Closes #110
Review
Clean Makefile and man page. All targets verified working.
Verified:
make build VERSION=X— builds with ldflag,ttheart -versionprints correctlymake test— all tests pass with race detector (works with and without vendor)make cross VERSION=X— producesttheart-linux-amd64(9.3M) andttheart-linux-arm64(8.6M)make clean— removes all artifactsDesign: Standard Go Makefile pattern.
builddepends onvendorfor reproducible builds by default.GOFLAGSvariable provided for customization.DESTDIRprefix on install target for packaging.Non-blocking:
make mantarget usessedto extract a plain-text excerpt from README, which will overwrite the committed troff-formatted man page. The regenerated output is plain text, not troff. Either remove the target (the man page is already committed) or fix it to produce proper troff output.No blocking issues.
APPROVED