mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-25 10:02:31 +00:00
make: Fix for local builds outside of GOPATH
Go can be weird about tools having to run in a directory with go.mod. This commit moves the linuxkit makefile to the same directory as the code. It also changes the semantics of the local-build target. You can now use STATIC=0 for dynamic builds or PIE=1 to use --buildmode=pie. The binaries we were producing in local-static weren't actually static so I fixed that too Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -57,7 +57,7 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
make GOARCH=${{matrix.target.arch}} GOOS=${{matrix.target.os}} LOCAL_TARGET=bin/linuxkit-${{matrix.target.suffix}} local-build
|
||||
make GOARCH=${{matrix.target.arch}} GOOS=${{matrix.target.os}} LOCAL_TARGET=$(pwd)/bin/linuxkit-${{matrix.target.suffix}} local-build
|
||||
file bin/linuxkit-${{matrix.target.suffix}}
|
||||
env:
|
||||
GOPATH: ${{runner.workspace}}
|
||||
|
||||
Reference in New Issue
Block a user