scripts-to-rule-them-all (#59)
All checks were successful
check / check (push) Successful in 4s
All checks were successful
check / check (push) Successful in 4s
Reviewed-on: #59 Co-authored-by: sneak <sneak@sneak.berlin> Co-committed-by: sneak <sneak@sneak.berlin>
This commit was merged in pull request #59.
This commit is contained in:
26
Makefile
26
Makefile
@@ -1,22 +1,28 @@
|
||||
.PHONY: test lint fmt fmt-check check build run dev deps docker clean hooks css
|
||||
.PHONY: bootstrap setup test lint fmt fmt-check check build run dev deps docker clean hooks css
|
||||
|
||||
# Default target
|
||||
.DEFAULT_GOAL := check
|
||||
|
||||
bootstrap:
|
||||
@script/bootstrap
|
||||
|
||||
setup:
|
||||
@script/setup
|
||||
|
||||
test:
|
||||
go test -v -race -timeout 30s ./...
|
||||
@script/test
|
||||
|
||||
lint:
|
||||
golangci-lint run --config .golangci.yml ./...
|
||||
@script/lint
|
||||
|
||||
fmt:
|
||||
gofmt -s -w .
|
||||
@command -v goimports >/dev/null 2>&1 && goimports -w . || true
|
||||
@script/fmt
|
||||
|
||||
fmt-check:
|
||||
@test -z "$$(gofmt -s -l .)" || { echo "gofmt needed on:"; gofmt -s -l .; exit 1; }
|
||||
@script/fmt-check
|
||||
|
||||
check: fmt-check lint test build
|
||||
check:
|
||||
@script/check
|
||||
|
||||
build:
|
||||
go build -o bin/webhooker ./cmd/webhooker
|
||||
@@ -32,15 +38,13 @@ deps:
|
||||
go mod tidy
|
||||
|
||||
docker:
|
||||
docker build -t webhooker:latest .
|
||||
@script/docker
|
||||
|
||||
clean:
|
||||
rm -rf bin/
|
||||
|
||||
hooks:
|
||||
@printf '#!/bin/sh\nmake check\n' > .git/hooks/pre-commit
|
||||
@chmod +x .git/hooks/pre-commit
|
||||
@echo "pre-commit hook installed"
|
||||
@script/install-precommit
|
||||
|
||||
css:
|
||||
tailwindcss -i static/css/input.css -o static/css/tailwind.css --minify
|
||||
|
||||
Reference in New Issue
Block a user