-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Generate release binaries #285
Conversation
This ensures that the install target does not fail if one runs `make install` without running `make` prior to that. Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
This will allow setting the version in the file name of generated release binaries Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
When the `release` target is used, release binaries for various platforms are generated. These binaries are gzip compressed and the tarball SHA256 checksum is computed. Example: $ make release $ tree release release ├── darwin │ ├── 386 │ │ └── hubble │ └── amd64 │ └── hubble ├── hubble-v0.7.0-dev-darwin-386.tar.gz ├── hubble-v0.7.0-dev-darwin-386.tar.gz.sha256sum ├── hubble-v0.7.0-dev-darwin-amd64.tar.gz ├── hubble-v0.7.0-dev-darwin-amd64.tar.gz.sha256sum ├── hubble-v0.7.0-dev-linux-386.tar.gz ├── hubble-v0.7.0-dev-linux-386.tar.gz.sha256sum ├── hubble-v0.7.0-dev-linux-amd64.tar.gz ├── hubble-v0.7.0-dev-linux-amd64.tar.gz.sha256sum └── linux ├── 386 │ └── hubble └── amd64 └── hubble 6 directories, 12 files Note: only darwin (macos) and linux are supported at the moment as hubble lacks windows support. Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
Makefile
Outdated
for OS in darwin linux; do \ | ||
for ARCH in 386 amd64; do \ | ||
test -d release/$$OS/$$ARCH|| mkdir -p release/$$OS/$$ARCH; \ | ||
env GOOS=$$OS GOARCH=$$ARCH $(GO) build $(if $(GO_TAGS),-tags $(GO_TAGS)) -ldflags "-w -s -X 'github.com/cilium/hubble/pkg.Version=${VERSION}'" -o release/$$OS/$$ARCH/$(TARGET); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Can we extract a common variable/macro for the build flags (-tags, -w, -s, -X etc)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on the Windows support!
This allows hubble to be built for Windows as well. Note that `os.Interrupt` is the only signal value that is guaranteed to be present on all systems (along with `os.Kill`). This means that `unix.SIGTERM` has been dropped and is no longer handled. This should however be fine as hubble is now only run as a command-line program and `os.Interrupt` is the signal that is sent by `ctrl-c`. In effect, this means that users are still able to interrupt a `hubble observe --follow` command. Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
16f0dd8
to
80fb448
Compare
See individual commits for details.