Skip to content

Commit d10d175

Browse files
authored
Make it possible to extend Makefile with custom settings. (cortexproject#3279)
Signed-off-by: Peter Štibraný <[email protected]>
1 parent 645485d commit d10d175

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ blocksconvert
1818
cortex
1919
query-tee
2020
test-exporter
21+
22+
# This is custom Makefile modification, if it exists.
23+
Makefile.local

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Local settings (optional). See Makefile.local.example for an example.
2+
# WARNING: do not commit to a repository!
3+
-include Makefile.local
4+
15
.PHONY: all test clean images protos exes dist doc clean-doc check-doc
26
.DEFAULT_GOAL := all
37

Makefile.local.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Example of extending Makefile with Makefile.local.
2+
3+
BUILD_IMAGE ?= quay.io/cortexproject/build-image
4+
IMAGE_PREFIX ?= custom-prefix/
5+
6+
blocksconvert-push: cmd/blocksconvert/.uptodate
7+
docker push $(IMAGE_PREFIX)blocksconvert:$(IMAGE_TAG)
8+
9+
cortex-push: cmd/cortex/.uptodate
10+
docker push $(IMAGE_PREFIX)cortex:$(IMAGE_TAG)

0 commit comments

Comments
 (0)