-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtools.mk
More file actions
31 lines (24 loc) · 842 Bytes
/
tools.mk
File metadata and controls
31 lines (24 loc) · 842 Bytes
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
TOP_LEVEL=$(shell git rev-parse --show-toplevel)
TOOLS_DIR := $(TOP_LEVEL)/hack/tools
TOOLS_BIN_DIR := $(TOOLS_DIR)/bin
BUILD_DIR := $(TOP_LEVEL)/build
BUILD_OCI_DIR := $(BUILD_DIR)/oci
export STACKER := $(TOOLS_BIN_DIR)/stacker
export SKOPEO := skopeo
STACKER_WITH_BUILD_DIR := $(STACKER) --stacker-dir $(BUILD_DIR)/.stacker --oci-dir $(BUILD_OCI_DIR) --roots-dir $(BUILD_DIR)/roots
$(STACKER):
mkdir -p $(TOOLS_BIN_DIR)
curl -fsSL https://github.com/andaaron/stacker/releases/download/v1.0.0-rc4-copy/stacker -o $@
chmod +x $@
.PHONY: check-skopeo
check-skopeo:
$(SKOPEO) -v || (echo "You need skopeo to be installed in order to copy images"; exit 1)
.PHONY: clean
clean: $(STACKER)
$(STACKER_WITH_BUILD_DIR) clean
.PHONY: tags
tags:
@echo $(PUBLISH_TAGS)
.PHONY: vars
vars:
$(foreach v, $(.VARIABLES), $(info $(v) = $($(v))))