embed static files now (#14)
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Co-authored-by: sneak <sneak@sneak.berlin> Reviewed-on: #14
This commit was merged in pull request #14.
This commit is contained in:
24
Makefile
24
Makefile
@@ -1,15 +1,13 @@
|
||||
ARCH := $(shell uname -m)
|
||||
VERSION := $(shell git describe --always --dirty=-dirty)
|
||||
|
||||
FN := http
|
||||
|
||||
VERSION := $(shell git describe --always --dirty=-dirty)
|
||||
ARCH := $(shell uname -m)
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
GOLDFLAGS += -X main.Version=$(VERSION)
|
||||
GOLDFLAGS += -X main.Buildarch=$(ARCH)
|
||||
GOFLAGS := -ldflags "$(GOLDFLAGS)"
|
||||
|
||||
default: debug
|
||||
default: clean debug
|
||||
|
||||
commit: fmt lint
|
||||
git commit -a
|
||||
@@ -19,7 +17,7 @@ commit: fmt lint
|
||||
# get gofumports with:
|
||||
# go get mvdan.cc/gofumpt/gofumports
|
||||
fmt:
|
||||
gofumports -l -w .
|
||||
gofumpt -l -w .
|
||||
golangci-lint run --fix
|
||||
|
||||
lint:
|
||||
@@ -41,16 +39,10 @@ clean:
|
||||
docker:
|
||||
docker build --progress plain .
|
||||
|
||||
./$(FN)d: cmd/$(FN)d/main.go */*.go
|
||||
cd httpserver && \
|
||||
cd ../cmd/$(FN)d && \
|
||||
go build -o ../../$(FN)d $(GOFLAGS) . && \
|
||||
cd ../.. && \
|
||||
rice append -i ./httpserver --exec ./httpd
|
||||
./$(FN)d: cmd/$(FN)d/main.go internal/*/*.go templates/* static/*
|
||||
cd ./cmd/$(FN)d && \
|
||||
go build -o ../../$(FN)d $(GOFLAGS) .
|
||||
|
||||
tools: rice-install
|
||||
tools:
|
||||
go get -v github.com/golangci/golangci-lint/cmd/golangci-lint@v1.31.0
|
||||
go get -v mvdan.cc/gofumpt/gofumports
|
||||
|
||||
rice-install:
|
||||
go get -v github.com/GeertJohan/go.rice/rice
|
||||
|
||||
Reference in New Issue
Block a user