* Add new CI step for checking email templates https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=2c1d9628-675f-4eb6-80bb-db9e4d09b8bf ```release-note NONE ``` * Pre-install ```release-note NONE ``` * pinning down to 4.9.0 ```release-note NONE ``` Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
20 строки
568 B
Makefile
20 строки
568 B
Makefile
# Directory containing mjml templates
|
|
OUTPUT_DIR=.
|
|
MJML=mjml
|
|
|
|
## Also update the circleCI file if you update this.
|
|
check-prereq: ## check if mjml is installed
|
|
@if ! [ -x "$$(command -v mjml)" ]; then \
|
|
echo "mjml is not installed. Installing mjml"; \
|
|
npm install -g mjml@4.9.0; \
|
|
fi;
|
|
|
|
|
|
build: check-prereq ## Compile all mjml email templates
|
|
@for f in $(shell ls *.mjml); \
|
|
do \
|
|
echo "{{define \"$${f%.*}\"}}\n" > $(OUTPUT_DIR)/$${f%.*}.html; \
|
|
$(MJML) $${f} -s >> $(OUTPUT_DIR)/$${f%.*}.html; \
|
|
echo "\n{{end}}" >> $(OUTPUT_DIR)/$${f%.*}.html; \
|
|
done
|