60 lines
1000 B
Makefile
60 lines
1000 B
Makefile
WORKDIR=$(shell pwd)
|
|
|
|
.PHONY: all
|
|
all: build
|
|
|
|
.PHONY: build
|
|
build:
|
|
cd $(WORKDIR) && go build -o out/kermago
|
|
|
|
.PHONY: test
|
|
test:
|
|
cd $(WORKDIR) && go test -v -coverpkg=./... ./...
|
|
|
|
.PHONY: format
|
|
format:
|
|
cd $(WORKDIR) && gofmt -l -s -w .
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf /var/local/badkerma/*.json
|
|
|
|
.PHONY: run
|
|
run:
|
|
cd $(WORKDIR) && go run .
|
|
|
|
.PHONY: clean-run
|
|
clean-run: clean run
|
|
|
|
.PHONY: debug
|
|
debug:
|
|
cd $(WORKDIR) && KERMA_DEBUG=true go run .
|
|
|
|
.PHONY: clean-debug
|
|
clean-debug: clean debug
|
|
|
|
.PHONY: docker-build
|
|
docker-build:
|
|
docker-compose build
|
|
|
|
.PHONY: docker-push
|
|
docker-push: docker-build
|
|
docker-compose push
|
|
|
|
.PHONY: docker-debug
|
|
docker-debug: docker-build
|
|
KERMA_DEBUG=true docker-compose up
|
|
|
|
.PHONY: docker-run
|
|
docker-run: docker-build
|
|
docker-compose up -d
|
|
|
|
.PHONY: docker-stop
|
|
docker-stop:
|
|
docker-compose down
|
|
|
|
.PHONY: lint
|
|
lint:
|
|
docker pull docker.io/oxsecurity/megalinter:latest
|
|
docker run -e DEFAULT_WORKSPACE='/src' -v "$(shell pwd):/src" docker.io/oxsecurity/megalinter:latest
|