Fix release workflow by using Makefile target for consistent builds#868
Fix release workflow by using Makefile target for consistent builds#868mattisonchao merged 5 commits intomainfrom
Conversation
Co-authored-by: mattisonchao <74767115+mattisonchao@users.noreply.github.com>
|
Hi @copilot why not use make build directly? |
Co-authored-by: mattisonchao <74767115+mattisonchao@users.noreply.github.com>
You're right! I've updated the workflow to include the build flags from the Makefile ( |
|
@copilot |
Co-authored-by: mattisonchao <74767115+mattisonchao@users.noreply.github.com>
Great suggestion! I've created a new |
Co-authored-by: mattisonchao <74767115+mattisonchao@users.noreply.github.com>
The release workflow introduced in #866 fails during binary compilation with
directory not founderror. The build command references./cmd/oxia, but the repository structure has the main package at./cmd. Additionally, the workflow was missing important build flags that are used in the Makefile.Changes
./cmd/oxiato./cmdto match the repository structurerelease-buildtarget that encapsulates all release build logic with parameters:OUTPUT_DIR: Directory for build outputOUTPUT_NAME: Name of the output binaryGOOS: Target operating systemGOARCH: Target architecturemake release-buildinstead of directgo buildcommandsThe
release-buildtarget includes the same build flags as the standardbuildtarget:-tags disable_trap: Disables trap functionality for production builds-ldflags "-X main.version=${VERSION}": Embeds version information into the binary-v: Enables verbose outputgit describe --tags --always | cut -c2-Benefits
This enables the workflow to build cross-platform binaries (linux/darwin/windows, amd64/arm64) successfully with proper version information and build configuration that stays in sync with the project's Makefile.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.