If we're on a branch other than main or dev, then when building "nightly",
build it with the name of the branch instead. Overrideable via an env var.
It's a bit ugly because of limitations of goreleaser templating, we can't haul
the expression out to be defined once, but it works.
Can build a custom Docker image with:
goreleaser release --snapshot -p 2 -f .goreleaser-nightly.yml --clean
Since we have never released with goreleaser and GO111MODULE=on
and have removed vendor directory, we are going to push a
v2.7.0-rc1 tag. If the goreleaser process works fine and submit
the draft release correctly, we will not do an actual v2.7.0-rc1
release. Instead, we will follow up immediately with the v2.7.0
tag and the proper release.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This retains the symbols (but still removes the dwarf info).
This increases the executable size by ~8% (test on my laptop):
$ go build -ldflags '-w' -o nats-server
-rwxrwxr-x 1 yzhao yzhao 11911273 Jul 28 15:52 nats-server
$ go build -ldflags '-s -w' -o nats-server
-rwxrwxr-x 1 yzhao yzhao 11128832 Jul 28 15:52 nats-server
Symbols are very useful during debugging. It would be great that if the
NATS team consider including symbols.