2023-08-06 19:01:25 +00:00
|
|
|
.PHONY: all build build_arm64 dev
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
2023-08-11 11:35:57 +00:00
|
|
|
GOBUILDLDFLAGS="-X main.Version=`git describe --always --dirty`"
|
2023-08-10 17:08:23 +00:00
|
|
|
#GOBUILDLDFLAGS="-X main.Version=`git describe --dirty` -linkmode 'external' -extldflags '-static'"
|
|
|
|
|
2023-08-06 19:01:25 +00:00
|
|
|
build:
|
2023-08-10 17:08:23 +00:00
|
|
|
go build -tags netgo -ldflags=${GOBUILDLDFLAGS} .
|
2023-08-06 19:01:25 +00:00
|
|
|
|
|
|
|
build_arm64:
|
2023-08-10 17:08:23 +00:00
|
|
|
GOOS=linux GOARCH=arm64 go build -tags netgo -ldflags=${GOBUILDLDFLAGS} .
|
2023-08-06 19:01:25 +00:00
|
|
|
|
|
|
|
dev: build_arm64
|
2023-07-30 10:38:47 +00:00
|
|
|
scp godoor workshopdoor:/tmp/
|
|
|
|
ssh workshopdoor 'mv -f /tmp/godoor ~/ && sudo systemctl restart godoor'
|