From 147a81a7858bb1ad1ca0dabe09eadd66fe776a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 1 Oct 2018 14:48:44 +0200 Subject: [PATCH 2/2] build: get list of themes regardless of themes.json (#26857) --- Makefile | 3 ++- get_themes.py | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 get_themes.py diff --git a/Makefile b/Makefile index d80e47a6..7c8acd7c 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ themes.json: $(wildcard static/*/config.json) %.css: %.scss $(wildcard static/includes/*.scss) static/includes/_data_uris.scss static/grandlyon-gnm/_data_uris.scss static/toodego/_data_uris.scss $$(wildcard $$(@D)/*.scss) sass $< $@ -css: $(wildcard static/*/style.css) +css: $(shell python get_themes.py) rm -rf static/*/.sass-cache/ icons: @@ -57,6 +57,7 @@ DIST_FILES = \ Makefile \ desc.xml \ create_themes_json.py \ + get_themes.py \ make_data_uris.py \ static templates \ src diff --git a/get_themes.py b/get_themes.py new file mode 100644 index 00000000..aa64164f --- /dev/null +++ b/get_themes.py @@ -0,0 +1,9 @@ +#! /usr/bin/env python + +import os + +for dirname in sorted(os.listdir('static')): + config = os.path.join('static', dirname, 'config.json') + if not os.path.exists(config): + continue + print 'static/%s/style.css' % dirname -- 2.19.0