Closed vikin91 closed 4 years ago
Because of the reference in the PR, GH automatically closed the issue .. I have added some tests which confirmed the bug and implemented/merged a fix.
Re-opening this issue until you can confirm it works as you expect.
I will test this using a build from master
.
Side note: I need to patch Makefile
every time I build, because it results in errors on Mac. I will fix it in my PR, but here is how it looks like:
$ make cross-compile
rm ./build/* || true
mkdir -p ./build/
for GOOS in linux darwin; do \
for GOARCH in 386 amd64; do \
export GOOS=$GOOS; \
export GOARCH=$GOARCH; \
go build -ldflags "-X main.vshVersion=-n v0.5.0" -o build/vsh_${GOOS}_${GOARCH}; \
done \
done
# github.com/fishi0x01/vsh
usage: link [options] main.o
...
Note this part: go build -ldflags "-X main.vshVersion=-n v0.5.0"
- the -n
should not be there :)
Consider using VERSION := $(shell git describe --tags --always --dirty)
for discovering git version in one line.
Okay, I can confirm that the original bug is fixed now! Thanks for the quick fix!
Affects version: 0.5.0, Mac
Here a scenario to reproduce: