rspamd/set-version.sh
Peter Wu fda0ad2142 [Minor] Update Debian and RPM package versions
* Add script that can be used after tagging to update versions.
* Example (for this commit): `./set-version.sh 2.4`
* Clear Debian changelog, this information is not updated anyway.
2020-02-14 23:21:42 +00:00

15 строки
480 B
Bash
Исполняемый файл

#!/bin/bash
# Update the version after a new release.
version=$1
if ! [[ "$version" =~ ^[0-9]+.[0-9]+$ ]]; then
echo "Usage: $0 <major>.<minor>"
exit 1
fi
read major minor <<< "${version/./ }"
sed -e "s/^\\(SET(RSPAMD_VERSION_MAJOR \\)[0-9]*)/\\1$major)/" \
-e "s/^\\(SET(RSPAMD_VERSION_MINOR \\)[0-9]*)/\\1$minor)/" \
-i CMakeLists.txt
sed -e "1s/([0-9.]*)/($version)/" -i debian/changelog
sed -e "s/^\\(Version: *\\)[0-9.]*$/\\1$version/" -i centos/rspamd.spec