-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
48 lines (39 loc) · 996 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
PROJECTNAME=$(shell basename "$(PWD)")
# Go related variables.
# Make is verbose in Linux. Make it silent.
MAKEFLAGS += --silent
.PHONY: setup
## setup: Setup installes dependencies
setup:
@go mod tidy
.PHONY: test
## test: Runs go test with default values
test:
@go test -v -race -count=1 ./...
.PHONY: build
## build: Build from source
build:
@go build -o scan4log4shell .
.PHOMY: docker-build
## docker-build: Build a docker image
docker-build:
docker build -t scan4log4shell .
.PHONY: run
run:
@go run *.go remote url -h
.PHONY: run-local
## run-local: Runs local test environment
run-local:
@docker-compose -f docker-compose.local.yml up --build
.PHONY: run-remote
## run-remote: Runs remote test environment
run-remote:
@docker-compose -f docker-compose.remote.yml up --build
.PHONY: help
## help: Prints this help message
help: Makefile
@echo
@echo " Choose a command run in "$(PROJECTNAME)":"
@echo
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo