forked from newrelic/newrelic-kubernetes-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (33 loc) · 1.13 KB
/
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
#############################
# Global vars
#############################
PROJECT_NAME := $(shell basename $(shell pwd))
PROJECT_VER ?= $(shell git describe --tags --always --dirty | sed -e '/^v/s/^v\(.*\)$$/\1/g') # Strip leading 'v' if found
# Last released version (not dirty)
PROJECT_VER_TAGGED ?= $(shell git describe --tags --always --abbrev=0 | sed -e '/^v/s/^v\(.*\)$$/\1/g') # Strip leading 'v' if found
SRCDIR ?= .
GO = go
# The root module (from go.mod)
PROJECT_MODULE ?= $(shell $(GO) list -m)
#############################
# Targets
#############################
all: build
# Humans running make:
build: git-hooks check-version clean generate lint test cover-report compile
# Build command for CI tooling
build-ci: check-version clean lint test compile-only
# All clean commands
clean: cover-clean compile-clean release-clean
# Import fragments
include build/compile.mk
include build/docker.mk
include build/document.mk
include build/generate.mk
include build/kube.mk
include build/lint.mk
include build/release.mk
include build/test.mk
include build/tools.mk
include build/util.mk
.PHONY: all build build-ci clean