summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-08-21 11:35:43 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-08-21 11:35:43 +0200
commit8a04cf20c5d6dc577a7de7745cbeb292bf78529d (patch)
treeabec0b23651b13988630486f63977f3018d463d9 /scripts
parent73cbb842a4815a36e03d9e0c7243effd568c7bfd (diff)
asset version management
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/asset-rebuild4
-rwxr-xr-xscripts/asset-release15
2 files changed, 17 insertions, 2 deletions
diff --git a/scripts/asset-rebuild b/scripts/asset-rebuild
index c2c722b..549fd7a 100755
--- a/scripts/asset-rebuild
+++ b/scripts/asset-rebuild
@@ -5,5 +5,5 @@
set -ex
-sassc -t compressed sass/dark.scss static/v0/css/dark.min.css
-sassc -t compressed sass/light.scss static/v0/css/light.min.css
+sassc -t compressed sass/dark.scss static/css/dark.min.css
+sassc -t compressed sass/light.scss static/css/light.min.css
diff --git a/scripts/asset-release b/scripts/asset-release
new file mode 100755
index 0000000..e0a74da
--- /dev/null
+++ b/scripts/asset-release
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Copyright (C) 2020 Daniel Friesel
+#
+# SPDX-License-Identifier: CC0-1.0
+
+set -ex
+
+current="$(find static/v* | tail -n 1 | grep -o '[0-9]*$')"
+prev=$((current - 1))
+next=$((current + 1))
+
+git mv static/v${prev} static/v${next}
+
+perl -pi -e "s!/static/v${current}/!/static/v${next}/!g" \
+ sass/*.scss static/css/*.min.css templates/*