webp_server_go/Makefile
BugFest 4003b03022
Multiple backends support (#207)
* Fix: h2non/filetype upgraded to support avif signatures

* Fix: make clean updated to include test/output dirs

* Feature: multi-backend support via IMG_MAP config key as described in #217

* feat: implement both local and remote (proxyMode) mappings for multi-backend

* Feature: multi-backend support via IMG_MAP config key as described in #217

* fix: go-is-svg should be direct import

* fix: imgMap paths are relative to CWD

* feature: IMG_MAP is parsed on start

---------

Co-authored-by: Nova Kwok <n0vad3v@riseup.net>
2023-08-02 23:33:54 +08:00

45 lines
1.0 KiB
Makefile

ifeq ($(shell uname),Linux)
OS=linux
else
OS=darwin
endif
ifeq ($(shell uname -m),aarch64)
ARCH=arm64
else ifeq ($(shell uname -m),arm64)
ARCH=arm64
else
ARCH=amd64
endif
default:
make clean
go build -o builds/webp-server-$(OS)-$(ARCH) .
ls builds
all:
make clean
./scripts/build.sh $(OS) $(ARCH)
tools-dir:
mkdir -p tools/bin
install-staticcheck: tools-dir
GOBIN=`pwd`/tools/bin go install honnef.co/go/tools/cmd/staticcheck@latest
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b ./tools/bin v1.52.2
static-check: install-staticcheck
#S1000,SA1015,SA4006,SA4011,S1023,S1034,ST1003,ST1005,ST1016,ST1020,ST1021
tools/bin/staticcheck -checks all,-ST1000 ./...
GO111MODULE=on tools/bin/golangci-lint run -v $$($(PACKAGE_DIRECTORIES)) --config .golangci.yml
test:
go test -v -coverprofile=coverage.txt -covermode=atomic ./...
clean:
rm -rf prefetch remote-raw exhaust tools coverage.txt metadata exhaust_test
docker:
DOCKER_BUILDKIT=1 docker build -t webpsh/webps .