From 0eea4a0abfdbf1225abd148eac0a7f151c1144b3 Mon Sep 17 00:00:00 2001 From: Kenny Ballou Date: Tue, 28 Jan 2020 21:49:30 -0700 Subject: code-{build,commit} auto build and deploy blog Create codecommit and codebuild resources to store and build web/blog content. Add in a lambda function to trigger the builds automatically to futher automate deployment and publishing of content. Signed-off-by: Kenny Ballou --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2acd93f..5acf3c4 100644 --- a/Makefile +++ b/Makefile @@ -14,9 +14,11 @@ else endif SOURCE_TEMPLATES:=$(wildcard stacks/*.tpl) +IN_SOURCES:= stacks/codecommit-build.py SOURCE_PARAMS:=$(wildcard params/*.tpl) TEMPLATES:=$(patsubst %.tpl, $(BUILD_DIR)/%.template, $(SOURCE_TEMPLATES)) STACK_PARAMS:=$(patsubst %.tpl, $(BUILD_DIR)/%.params, $(SOURCE_PARAMS)) +IN_OUTPUTS:=$(patsubst %,%.in, $(IN_SOURCES)) SOURCES:=$(shell find stacks/ -type f -name '*.in') @@ -28,7 +30,7 @@ all: autogen/stack.def \ autogen/stack.def: autogen/stack.def.in cat $^ > $@ -$(BUILD_DIR)/%.json: %.tpl $(SOURCES) +$(BUILD_DIR)/%.json: %.tpl $(SOURCES) $(IN_OUTPUTS) mkdir -p $(dir $@) $(AG) --override-tpl=$< --definitions=autogen/stack.def > $@ @@ -38,6 +40,12 @@ $(BUILD_DIR)/%.template: $(BUILD_DIR)/%.json $(BUILD_DIR)/%.params: $(BUILD_DIR)/%.json $(JQ) '.' $< > $@ +%.in: % + echo "[+ autogen5 template +]" > $@ + echo '{"Fn::Join": ["\n", [' >> $@ + $(SHELL) scm/ppag.scm $^ >> $@ + echo ']]}' >> $@ + .PHONY: clean clean: -rm -r $(BUILD_DIR) -- cgit v1.2.1