forked from newrelic/newrelic-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (37 loc) · 1.2 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
42
43
44
45
#############################
# Global vars
#############################
PROJECT_NAME := $(shell basename $(shell pwd))
PROJECT_VER ?= $(shell git describe --tags --always --dirty | sed -e '/^v/s/^v\(.*\)$$/\1/g')
# Last released version (not dirty) without leading v
PROJECT_VER_TAGGED := $(shell git describe --tags --always --abbrev=0 | sed -e '/^v/s/^v\(.*\)$$/\1/g')
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 lint test-unit 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 recipes-clean
# Import fragments
include build/chocolatey.mk
include build/compile.mk
include build/deps.mk
include build/docker.mk
include build/document.mk
include build/generate.mk
include build/lint.mk
include build/package.mk
include build/recipes.mk
include build/release.mk
include build/snapcraft.mk
include build/test.mk
include build/tools.mk
include build/util.mk
.PHONY: all build build-ci clean