diff options
author | Peter Wu <peter@lekensteyn.nl> | 2020-02-14 23:14:28 +0000 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2020-02-14 23:21:42 +0000 |
commit | fda0ad2142ddbed6da6152c00c5cfacae7af7d2f (patch) | |
tree | 42ebaf156d9c6f887251d8593931d6c8011d7164 /set-version.sh | |
parent | 3535e32ecdfc118c4d03979a182f81e7e33beb7f (diff) | |
download | rspamd-fda0ad2142ddbed6da6152c00c5cfacae7af7d2f.tar.gz rspamd-fda0ad2142ddbed6da6152c00c5cfacae7af7d2f.zip |
[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.
Diffstat (limited to 'set-version.sh')
-rwxr-xr-x | set-version.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/set-version.sh b/set-version.sh new file mode 100755 index 000000000..bd15b3abd --- /dev/null +++ b/set-version.sh @@ -0,0 +1,14 @@ +#!/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 |