forked from aws/eks-anywhere-prow-jobs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (23 loc) · 942 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
GOLANG_VERSION?="1.16"
export PULL_BASE_SHA?=$(shell git show -s --format=%H upstream/main)
export PULL_PULL_SHA?=$(shell git show -s --format=%H)
BIN_DIR := bin
CONFIG_DIR := config
export CONSTANTS_CONFIG_FILE ?= $(CONFIG_DIR)/job-constants.yaml
.PHONY: default
default: build lint
.PHONY: fmt
fmt: ## Run go fmt against code.
go fmt scripts/lint_prowjobs/main.go
.PHONY: vet
vet: ## Run go vet against code.
go vet scripts/lint_prowjobs/main.go
.PHONY: build
build: fmt vet ## Build linter
go build -o ./$(BIN_DIR)/prow-linter github.com/aws/eks-anywhere-prow-jobs/scripts/lint_prowjobs
.PHONY: lint
lint: build ## Run linter
./$(BIN_DIR)/prow-linter
.PHONY: help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[%\/0-9A-Za-z_-]+:.*?##/ { printf " \033[36m%-45s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)