1
0
mirror of https://github.com/cmur2/dyndnsd.git synced 2024-11-14 16:56:14 +01:00
dyndnsd/upgrade-version.sh
2021-04-16 23:16:58 +02:00

14 lines
313 B
Bash
Executable File

#!/bin/bash -eux
sed -i "s/$1/$2/g" lib/dyndnsd/version.rb
release_date=$(LC_ALL=en_US.utf8 date +"%B %-d, %Y")
if grep "## $2 (" CHANGELOG.md; then
true
elif grep "## $2" CHANGELOG.md; then
sed -i "s/## $2/## $2 ($release_date)/g" CHANGELOG.md
else
echo "## $2 ($release_date)" >> CHANGELOG.md
fi