key-cape/src/Makefile

30 lines
733 B
Makefile
Raw Normal View History

GOBIN ?= $(shell go env GOPATH)/bin
BINDIR = ../bin
.PHONY: all build test lint vet clean
all: vet lint test build
build:
go build -o $(BINDIR)/keycape ./cmd/keycape/
go build -o $(BINDIR)/validator ./cmd/validator/
go build -o $(BINDIR)/lldap-export ./cmd/lldap-export/
go build -o $(BINDIR)/keycape-to-keycloak ./cmd/keycape-to-keycloak/
go build -o $(BINDIR)/lldap-to-ldap ./cmd/lldap-to-ldap/
test:
go test ./...
vet:
go vet ./...
lint:
@if command -v golangci-lint >/dev/null 2>&1; then \
golangci-lint run ./...; \
else \
echo "golangci-lint not installed, skipping (run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest)"; \
fi
clean:
rm -rf $(BINDIR)