Skip to content

Commit

Permalink
Include example in go.work
Browse files Browse the repository at this point in the history
And use $VERSION in binaries
  • Loading branch information
Lars Ekman committed Jul 24, 2022
1 parent e97d93c commit 41e483d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions go.work
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ use (
./backends/windows/userspace
./client
./cmd
./examples/iptables-extip
./examples/pipe-exec
./examples/print-state
./examples/userspace-proxier
./server
)
3 changes: 2 additions & 1 deletion hack/go-build
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
set -ex
CGO_ENABLED=1 go build -trimpath -o dist $(hack/go-list-local-mods)
test -n "$VERSION" || VERSION=$(git describe --dirty --tags)
CGO_ENABLED=1 go build -trimpath -o dist -ldflags "-X main.version=$VERSION" $(hack/go-list-local-mods)

0 comments on commit 41e483d

Please sign in to comment.