You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
602 B
Makefile
36 lines
602 B
Makefile
.DEFAULT_GOAL := build
|
|
BASE_GOLANG_IMAGE := golang:1.22
|
|
IMAGE_NAME ?= androiddrew/fluxfeed
|
|
|
|
fmt:
|
|
go fmt ./...
|
|
.PHONY:fmt
|
|
|
|
lint: fmt
|
|
revive ./...
|
|
.PHONY:lint
|
|
|
|
vet: fmt
|
|
go vet ./...
|
|
.PHONY:vet
|
|
|
|
build: vet
|
|
go build -o ./fluxfeed .
|
|
.PHONY:build
|
|
|
|
clean:
|
|
rm -rf ./fluxfeed
|
|
.PHONY:clean
|
|
|
|
docs:
|
|
echo "Starting godocs on http://localhost:8000"
|
|
godoc -http=:8000
|
|
.PHONY:docs
|
|
|
|
image:
|
|
docker buildx build --platform linux/amd64 \
|
|
--build-arg BASE_IMAGE=$(BASE_GOLANG_IMAGE) \
|
|
--build-arg REPO_NAME=$(IMAGE_NAME) \
|
|
--build-arg REPO_SHA=$(shell git rev-parse HEAD) \
|
|
-t $(IMAGE_NAME) ./
|
|
.PHONY: image |