2018-11-17 13:01:37 -06:00
|
|
|
allyamls := $(shell find . -type f -name '*.yaml')
|
|
|
|
|
|
|
|
shared := $(wildcard ucglib/*.ucg)
|
|
|
|
bucketucgs := $(wildcard buckets/*.ucg)
|
|
|
|
|
|
|
|
%.yaml: %.ucg .libtarget
|
|
|
|
ucg build $<
|
|
|
|
|
|
|
|
# This ensures that we rebuild if the dependent ucglibs
|
|
|
|
# change.
|
|
|
|
.libtarget: $(shared)
|
|
|
|
touch .libtarget
|
|
|
|
|
|
|
|
build: bucketconfs gensite
|
|
|
|
|
|
|
|
bucketconfs: .libtarget $(patsubst %.ucg,%.yaml,$(bucketucgs))
|
|
|
|
|
|
|
|
all: build test
|
|
|
|
|
|
|
|
test:
|
|
|
|
ucg test -r
|
|
|
|
|
2018-11-18 13:58:29 -06:00
|
|
|
content := $(shell find site/content -type f -iname *.md)
|
|
|
|
|
|
|
|
site/.built: $(content)
|
2018-11-17 13:01:37 -06:00
|
|
|
cd site; \
|
2019-02-18 10:32:00 -06:00
|
|
|
zola build -o generated
|
2018-11-18 13:58:29 -06:00
|
|
|
touch site/.built
|
|
|
|
|
|
|
|
gensite: site/.built
|
2018-11-17 13:01:37 -06:00
|
|
|
|
|
|
|
deploysite: gensite
|
|
|
|
cd site/; \
|
|
|
|
gsutil -m rsync -d -r generated gs://ucg.marzhillstudios.com/
|
|
|
|
|
|
|
|
clean:
|
2018-12-12 19:19:51 -06:00
|
|
|
rm -f $(allyamls) site/.built
|
|
|
|
rm -rf site/generated/*
|