dda-backup/release.sh

21 lines
511 B
Bash
Raw Normal View History

2022-05-10 15:02:57 +00:00
#!/bin/bash
source development-version.sh
if [ -z "$VERSION" ]
then
echo "Error: VERSION needs to be set!"
else
2022-05-11 08:25:13 +00:00
git pull
2022-05-10 15:02:57 +00:00
echo "Release version: $VERSION"
2022-05-11 08:25:13 +00:00
2022-05-10 15:02:57 +00:00
while IFS='.' read -ra NUM; do
echo "VERSION=${NUM[0]}.${NUM[1]}.$((NUM[2]+1)) \$@" > development-version.sh
done <<< "$VERSION"
echo "Version bumped in file 'development-version.sh'"
2022-05-11 08:25:13 +00:00
git add -A && git commit -m "Version ${VERSION}"
git tag -a ${VERSION} -m "Release ${VERSION}"
git push --follow-tags
2022-05-10 15:02:57 +00:00
fi