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/asset-release | |
parent | 73cbb842a4815a36e03d9e0c7243effd568c7bfd (diff) |
asset version management
Diffstat (limited to 'scripts/asset-release')
-rwxr-xr-x | scripts/asset-release | 15 |
1 files changed, 15 insertions, 0 deletions
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/* |