2018-07-09 16:20:40 +02:00
|
|
|
#!/usr/bin/env bash
|
2019-11-03 19:05:56 +02:00
|
|
|
# Nerd Fonts Version: 2.1.0
|
2018-03-03 21:14:22 +02:00
|
|
|
# Script Version: 1.0.1
|
2017-05-02 01:43:28 +02:00
|
|
|
# bump version number for release in scripts (bash and python)
|
|
|
|
# does not do semver format checking
|
|
|
|
# this obviously is not perfect but works good enough for now (YAGNI)
|
|
|
|
# todo take some ideas from: https://github.com/fsaintjacques/semver-tool
|
|
|
|
|
|
|
|
#set -x
|
2017-05-14 00:02:53 +02:00
|
|
|
LINE_PREFIX="# [Nerd Fonts] "
|
|
|
|
|
2017-05-02 01:43:28 +02:00
|
|
|
if [ ! $# -eq 1 ]
|
|
|
|
then
|
2017-07-30 03:20:17 +02:00
|
|
|
echo "$LINE_PREFIX No release version given, must give semver release version in format: #.#.#, e.g. 1.1.0"
|
2017-05-02 01:43:28 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
release=$1
|
|
|
|
|
2021-11-21 19:05:02 +02:00
|
|
|
echo "$LINE_PREFIX Bump version to $release"
|
|
|
|
|
2018-01-13 05:20:52 +02:00
|
|
|
sed -i "s|[0-9]\\.[0-9]\\.[0-9]|$release|g" ../../font-patcher
|
2019-11-23 06:58:44 +02:00
|
|
|
sed -i "s|\\# Nerd Fonts Version: [0-9]\\.[0-9]\\.[0-9]|\\# Nerd Fonts Version: $release|g" ../../bin/scripts/**/*.sh
|
|
|
|
sed -i "s|\\# Nerd Fonts Version: [0-9]\\.[0-9]\\.[0-9]|\\# Nerd Fonts Version: $release|g" ../../bin/scripts/**/*.py
|
|
|
|
sed -i "s|\\# Nerd Fonts Version: [0-9]\\.[0-9]\\.[0-9]|\\# Nerd Fonts Version: $release|g" ../../bin/scripts/*.sh
|
|
|
|
sed -i "s|\\# Nerd Fonts Version: [0-9]\\.[0-9]\\.[0-9]|\\# Nerd Fonts Version: $release|g" ../../bin/scripts/*.py
|
2018-01-13 05:20:52 +02:00
|
|
|
sed -i "s|\\# version: [0-9]\\.[0-9]\\.[0-9]|\\# version: $release|g" ../../bin/scripts/*.sh
|
|
|
|
sed -i "s|version=\"[0-9]\\.[0-9]\\.[0-9]\"|version=\"$release\"|g" ../../bin/scripts/*.sh
|
2017-05-02 01:43:28 +02:00
|
|
|
|
|
|
|
exit
|
|
|
|
|