summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKenny Ballou <kballou@devnulllabs.io>2020-01-28 21:49:30 -0700
committerKenny Ballou <kballou@devnulllabs.io>2020-02-05 17:33:12 -0700
commit0eea4a0abfdbf1225abd148eac0a7f151c1144b3 (patch)
tree7572d62e5a9260c2b755d6c085769f2dcab5e8b0 /Makefile
parent1bb882edd5c1745d1a1bd4cc12e30fcbd8f81be9 (diff)
downloadkennyballou.com-0eea4a0abfdbf1225abd148eac0a7f151c1144b3.tar.gz
kennyballou.com-0eea4a0abfdbf1225abd148eac0a7f151c1144b3.tar.xz
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 <kballou@devnulllabs.io>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
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)