summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-06-10 16:37:53 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-06-10 16:37:53 +0200
commitb4128aa649e10371a64d5905434038a2c08a970e (patch)
tree43715eb6e2bfe76424a6113cbb7813ba861e1d64 /scripts
parent01e57fbc505962ad86b27efb5dd928e2b32d18ae (diff)
add asset-release helper script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/asset-release15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/asset-release b/scripts/asset-release
new file mode 100755
index 0000000..6a3e179
--- /dev/null
+++ b/scripts/asset-release
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -ex
+
+current="$(find public/static/v* | tail -n 1 | grep -o '..$')"
+prev=$((current - 1))
+next=$((current + 1))
+
+git mv public/static/v${prev} public/static/v${next}
+
+perl -pi -e "s!/v${current}/!/v${next}/!g" \
+ public/static/css/material-icons.css
+
+perl -pi -e "s!av = 'v${current}'!av = 'v${next}'!" \
+ templates/layouts/app.html.ep templates/layouts/legacy.html.ep