Skip to content

Commit 0b22db0

Browse files
committed
Version EJS templates and main.js
1 parent a896748 commit 0b22db0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

deps/rabbitmq_management/Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ list-dist-deps::
4545
prepare-dist::
4646
$(verbose) sed 's/%%VSN%%/$(PROJECT_VERSION)/' bin/rabbitmqadmin \
4747
> $(EZ_DIR)/priv/www/cli/rabbitmqadmin
48-
mv $(EZ_DIR)/priv/www/css/main.css $(EZ_DIR)/priv/www/css/main-$(PROJECT_VERSION).css
49-
$(verbose) sed "s#css/main.css#css/main-$(PROJECT_VERSION).css#" priv/www/index.html \
50-
> $(EZ_DIR)/priv/www/index.html
5148
echo "management_version = \"$(PROJECT_VERSION)\";" >> $(EZ_DIR)/priv/www/js/global.js
49+
mv $(EZ_DIR)/priv/www/css/main.css $(EZ_DIR)/priv/www/css/main-$(PROJECT_VERSION).css
50+
mkdir $(EZ_DIR)/priv/www/js/$(PROJECT_VERSION)
51+
mv $(EZ_DIR)/priv/www/js/tmpl/ $(EZ_DIR)/priv/www/js/$(PROJECT_VERSION)/
52+
mv $(EZ_DIR)/priv/www/js/main.js $(EZ_DIR)/priv/www/js/$(PROJECT_VERSION)/main.js
53+
$(verbose) sed -e "s#css/main.css#css/main-$(PROJECT_VERSION).css#" \
54+
-e "s#js/main.js#js/$(PROJECT_VERSION)/main.js#" \
55+
priv/www/index.html > $(EZ_DIR)/priv/www/index.html

deps/rabbitmq_management/priv/www/js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,7 @@ function format(template, json) {
12861286
ejs_cached[template] = true;
12871287
cache = false;
12881288
}
1289-
var tmpl = new EJS({url: 'js/tmpl/' + template + '.ejs', cache: cache});
1289+
var tmpl = new EJS({url: 'js/' + management_version + '/tmpl/' + template + '.ejs', cache: cache});
12901290
return tmpl.render(json);
12911291
} catch (err) {
12921292
clearInterval(timer);

0 commit comments

Comments
 (0)