1
0
mirror of https://github.com/cmur2/dyndnsd.git synced 2024-11-18 10:56:15 +01:00
dyndnsd/upgrade-version.sh

14 lines
313 B
Bash
Raw Normal View History

2021-04-16 23:16:58 +02:00
#!/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