embed static files now (#14)
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:
2022-11-28 00:19:47 +00:00
parent 4e663d848a
commit 61228b4586
23 changed files with 795 additions and 406 deletions

View File

@@ -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