File: set-version.sh

package info (click to toggle)
rspamd 3.13.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,056 kB
  • sloc: ansic: 243,746; cpp: 105,657; javascript: 29,539; asm: 2,512; perl: 2,440; pascal: 1,625; python: 1,274; sql: 313; sh: 281; makefile: 140; xml: 74
file content (14 lines) | stat: -rwxr-xr-x 480 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
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