github.com/newrelic/newrelic-client-go@v1.1.0/Makefile (about)

     1  #############################
     2  # Global vars
     3  #############################
     4  PROJECT_NAME := $(shell basename $(shell pwd))
     5  PROJECT_VER  ?= $(shell git describe --tags --always --dirty | sed -e '/^v/s/^v\(.*\)$$/\1/g')
     6  # Last released version (not dirty)
     7  PROJECT_VER_TAGGED  := $(shell git describe --tags --always --abbrev=0 | sed -e '/^v/s/^v\(.*\)$$/\1/g')
     8  
     9  SRCDIR       ?= .
    10  GO            = go
    11  
    12  # The root module (from go.mod)
    13  PROJECT_MODULE  ?= $(shell $(GO) list -m)
    14  
    15  # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
    16  ifeq (,$(shell go env GOBIN))
    17  GOBIN=$(shell go env GOPATH)/bin
    18  else
    19  GOBIN=$(shell go env GOBIN)
    20  endif
    21  
    22  #############################
    23  # Targets
    24  #############################
    25  all: build
    26  
    27  # Humans running make:
    28  build: git-hooks check-version clean lint test cover-report compile
    29  
    30  # Build command for CI tooling
    31  build-ci: check-version clean lint test compile-only
    32  
    33  # All clean commands
    34  clean: cover-clean compile-clean release-clean
    35  
    36  # Import fragments
    37  include build/compile.mk
    38  include build/deps.mk
    39  include build/docker.mk
    40  include build/document.mk
    41  include build/generate.mk
    42  include build/lint.mk
    43  include build/release.mk
    44  include build/test.mk
    45  include build/tools.mk
    46  include build/util.mk
    47  
    48  .PHONY: all build build-ci clean