summaryrefslogtreecommitdiff
path: root/scripts/asset-release
blob: 5714745bf718ec25f16a92f88342fa18a9e9b16e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# Copyright (C) 2020 Birte Kristina Friesel
#
# SPDX-License-Identifier: CC0-1.0

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