This repository has been archived by the owner on Feb 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile.example
51 lines (37 loc) · 1.92 KB
/
Makefile.example
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
49
50
51
# Makefile for a standard repo with associated container
##### These variables need to be adjusted in most repositories #####
# This repo's root import path (under GOPATH).
PKG := github.com/drud/repo_name
# Docker repo for a push
# DOCKER_REPO ?= drud/docker_repo_name
# Upstream repo optionally used in the Dockerfile
# UPSTREAM_REPO ?= full/upstream-docker-repo
# Top-level directories to build
SRC_DIRS := pkg cmd
# Version variables to replace in build, The variable VERSION is automatically pulled from git committish so it doesn't have to be added
# These are replaced in the $(PKG).version package.
# VERSION_VARIABLES = ThisCmdVersion ThatContainerVersion
# These variables will be used as the defaults unless overridden by the make command line
#ThisCmdVersion ?= $(VERSION)
#ThatContainerVersion ?= drud/nginx-php-fpm7-local
# Optional to docker build
# DOCKER_ARGS =
# VERSION can be set by
# Default: git tag
# make command line: make VERSION=0.9.0
# Normally VERSION is derived from git committish/tag.
# VERSION can be overridden on make commandline: make push VERSION=0.9.1
# Using the git committish means we can always tie code to container or binary.
VERSION := $(shell git describe --tags --always --dirty)
# Each section of the Makefile is included from standard components below.
# If you need to override one, import its contents below and comment out the
# include. That way the base components can easily be updated as our general needs
# change.
include build-tools/makefile_components/base_build_go.mak
#include build-tools/makefile_components/base_build_python-docker.mak
include build-tools/makefile_components/base_container.mak
include build-tools/makefile_components/base_push.mak
include build-tools/makefile_components/base_test_go.mak
#include build-tools/makefile_components/base_test_python.mak
# Additional targets can be added below.
# Also, existing targets can be overridden by copying and customizing them.