Set the binary version to the git hash for debug builds
This commit is contained in:
parent
2eb721bbe7
commit
b6871f87ec
6
Makefile
6
Makefile
|
@ -1,15 +1,17 @@
|
||||||
|
GIT_HEAD = $(shell git rev-parse HEAD | head -c8)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -gcflags "all=-trimpath=$(pwd)" -o build/wings_linux_amd64 -v wings.go
|
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -gcflags "all=-trimpath=$(pwd)" -o build/wings_linux_amd64 -v wings.go
|
||||||
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -gcflags "all=-trimpath=$(pwd)" -o build/wings_linux_arm64 -v wings.go
|
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -gcflags "all=-trimpath=$(pwd)" -o build/wings_linux_arm64 -v wings.go
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
go build -race
|
go build -ldflags="-X github.com/pterodactyl/wings/system.Version=$(GIT_HEAD)" -race
|
||||||
sudo ./wings --debug --ignore-certificate-errors --config config.yml
|
sudo ./wings --debug --ignore-certificate-errors --config config.yml
|
||||||
|
|
||||||
# Runs a remotly debuggable session for Wings allowing an IDE to connect and target
|
# Runs a remotly debuggable session for Wings allowing an IDE to connect and target
|
||||||
# different breakpoints.
|
# different breakpoints.
|
||||||
rmdebug:
|
rmdebug:
|
||||||
go build -gcflags "all=-N -l" -race
|
go build -gcflags "all=-N -l" -ldflags="-X github.com/pterodactyl/wings/system.Version=$(GIT_HEAD)" -race
|
||||||
sudo dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./wings -- --debug --ignore-certificate-errors --config config.yml
|
sudo dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./wings -- --debug --ignore-certificate-errors --config config.yml
|
||||||
|
|
||||||
compress:
|
compress:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user