mirror of
https://github.com/derf/travelynx
synced 2024-11-30 00:10:18 +00:00
21 lines
599 B
Bash
Executable file
21 lines
599 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Copyright (C) 2020 Birte Kristina Friesel <derf@finalrewind.org>
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
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/service-worker.js public/static/manifest.json \
|
|
public/static/css/material-icons.css
|
|
|
|
perl -pi -e "s!static-cache-v${current}!static-cache-v${next}!" public/service-worker.js
|
|
|
|
perl -pi -e "s!av = 'v${current}'!av = 'v${next}'!" templates/layouts/default.html.ep
|