manual-approval/Makefile
Thomas Stringer 816ea3dd2b
Add linting (#23)
Adds linting and fixes a couple of linting issues. Closes #6.
2022-06-29 21:02:36 -04:00

25 lines
475 B
Makefile

IMAGE_REPO=ghcr.io/trstringer/manual-approval
.PHONY: build
build:
@if [ -z "$$VERSION" ]; then \
echo "VERSION is required"; \
exit 1; \
fi
docker build -t $(IMAGE_REPO):$$VERSION .
.PHONY: push
push:
@if [ -z "$$VERSION" ]; then \
echo "VERSION is required"; \
exit 1; \
fi
docker push $(IMAGE_REPO):$$VERSION
.PHONY: test
test:
go test -v .
.PHONY: lint
lint:
docker run --rm -v $$(pwd):/app -w /app golangci/golangci-lint:v1.46.2 golangci-lint run -v