now supports remote error reporting to sentry, if desired
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-09-30 21:59:20 -07:00
parent ae232ea6ab
commit 876f2d9a98
9 changed files with 251 additions and 55 deletions

View File

@@ -1,26 +1,13 @@
VERSION := $(shell git rev-parse --short=8 HEAD)
BUILDTIME := $(shell date -u '+%Y-%m-%dT%H:%M:%SZ')
BUILDTIMEFILENAME := $(shell date -u '+%Y%m%d-%H%M%SZ')
BUILDTIMETAG := $(shell date -u '+%Y%m%d%H%M%S')
BUILDUSER := $(shell whoami)
BUILDHOST := $(shell hostname -s)
BUILDARCH := $(shell uname -m)
ARCH := $(shell uname -m)
VERSION := $(shell git describe --always --dirty=-dirty --exclude="*")
FN := http
UNAME_S := $(shell uname -s)
GOLDFLAGS += -X main.Version=$(VERSION)
GOLDFLAGS += -X main.Buildarch=$(BUILDARCH)
# osx can't statically link apparently?!
ifeq ($(UNAME_S),Darwin)
GOFLAGS := -ldflags "$(GOLDFLAGS)"
endif
ifneq ($(UNAME_S),Darwin)
GOFLAGS = -ldflags "-linkmode external -extldflags -static $(GOLDFLAGS)"
endif
GOLDFLAGS += -X main.Buildarch=$(ARCH)
GOFLAGS := -ldflags "$(GOLDFLAGS)"
default: debug