diff options
author | Emma Foley <efoley@redhat.com> | 2021-05-20 20:35:39 +0100 |
---|---|---|
committer | Emma Foley <efoley@redhat.com> | 2021-05-27 18:11:13 +0100 |
commit | 28517f841a3261987114869e04624cdd686c31a5 (patch) | |
tree | 90be762787b86f95bcde1026a8a4cf565dc07ab0 /src/collectd/Makefile | |
parent | 923175d15112a865f3f51e80dab88922c17340d6 (diff) |
[docker][experimental] Allow COLLECTD_TAG to be passed to container build
This is an optional build arg that overrides the defaults that are set
by COLLECTD_FLAVOR
This should let the user pull from an arbitrary collectd branch (e.g. a
WIP branch or a PR branch from upstream)
Change-Id: I6d0ede2b8b57f28e152e53eddae378ac6c722706
Signed-off-by: Emma Foley <efoley@redhat.com>
Diffstat (limited to 'src/collectd/Makefile')
-rw-r--r-- | src/collectd/Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/collectd/Makefile b/src/collectd/Makefile index 7eb312da..ec45f941 100644 --- a/src/collectd/Makefile +++ b/src/collectd/Makefile @@ -25,7 +25,8 @@ include ../mk/master.mk include ../package-list.mk WORK_DIR = collectd -TAG_DONE_FLAG = $(WORK_DIR)/.$(COLLECTD_TAG).done +# $COLLECTD_TAG can contain "/", which is being replaced with "-" here +TAG_DONE_FLAG := $(WORK_DIR)/.$(subst /,-,"$(COLLECTD_TAG)").done BUILD_CMD = ./build.sh CONFIG_CMD = CONFIG_CMD += ./configure @@ -121,7 +122,7 @@ $(WORK_DIR): $(TAG_DONE_FLAG): $(WORK_DIR) @echo "Checking out collectd from tag: $(COLLECTD_TAG)" - $(AT)cd collectd; git checkout $(COLLECTD_TAG) + $(AT)cd collectd; git fetch origin $(COLLECTD_TAG); git checkout FETCH_HEAD ifneq ($(PATCH_FILE),) $(AT)cd $(WORK_DIR); patch -p1 < ../$(PATCH_FILE) endif |