File release.sh of Package roundcubemail-selfcontained
#!/bin/bash
set -e
set -x
make tarball
# Autobump the version
CURRENT_VERSION=$(grep '^Version: ' roundcubemail.spec | sed 's/Version: //')
NEW_VERSION=$(echo "$CURRENT_VERSION" | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.)
echo "Bumping from $CURRENT_VERSION to $NEW_VERSION"
sed -i "1 s/(.*-1~kolab1/($NEW_VERSION-1~kolab1/" debian.changelog
sed -i "s/^Version:.*/Version: 1:$NEW_VERSION-1~kolab1/" roundcubemail.dsc
sed -i "s/^Version:.*/Version: $NEW_VERSION/" roundcubemail.spec
osc ci -m "New release $NEW_VERSION"
osc sr Kolab:16 -m "New release $NEW_VERSION"