diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-08-21 11:35:43 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-08-21 11:35:43 +0200 |
commit | 8a04cf20c5d6dc577a7de7745cbeb292bf78529d (patch) | |
tree | abec0b23651b13988630486f63977f3018d463d9 /scripts | |
parent | 73cbb842a4815a36e03d9e0c7243effd568c7bfd (diff) |
asset version management
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/asset-rebuild | 4 | ||||
-rwxr-xr-x | scripts/asset-release | 15 |
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/* |