Files
gmi2html/Makefile
2025-03-21 10:47:15 +02:00

52 lines
689 B
Makefile

SHELL := /bin/env oksh
export PATH := $(PATH)
all: fmt lintfix tidy test clean build
debug:
@echo "PATH: $(PATH)"
@echo "GOPATH: $(shell go env GOPATH)"
@which go
@which gofumpt
@which gci
@which golangci-lint
clean:
rm -rf ./dist
# Test
test:
go test ./...
tidy:
go mod tidy
# Format code
fmt:
gofumpt -l -w .
gci write .
# Run linter
lint: fmt
golangci-lint run
# Run linter and fix
lintfix: fmt
golangci-lint run --fix
build: clean
mkdir ./dist
go build -o ./dist/gmi2html ./cmd/gmi2html
build-gccgo: clean
go build -compiler=gccgo -o ./dist/gmi2html ./cmd/gmi2html
show-updates:
go list -m -u all
update:
go get -u all
update-patch:
go get -u=patch all