-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (18 loc) · 757 Bytes
/
Makefile
File metadata and controls
26 lines (18 loc) · 757 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
SHELL = /bin/bash
.PHONY: help container package
.DEFAULT_GOAL = help
TOOL := "terraform"
help:
@echo -e "\nYou'll need to specify a thing to do:\n"
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-\/]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@echo -e "\nSpecify "TOOL=" and/or "VERSION=" to override defaults\n"
container: ## - Build Docker image to fetch and create packages
@echo "[i] Building docker image"
@docker build -t mcrmonkey/hashi-pkg .
output:
@echo "[i] Creating output directory"
@mkdir output
package: ## - Download the tool and create a package
@echo "[i] Getting ${TOOL}"
@${MAKE} output
@docker run -it --rm -e TOOL="${TOOL}" -e VERSION="${VERSION}" -v ${PWD}/output:/output mcrmonkey/hashi-pkg