Debian Codegraph @

set_version.sh

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 #!/bin/bash
2
3 VER=${1:?Provide version sring on command line}
4 DATE=$(TZ=UTC LOCALE=C date '+%B %e, %Y')
5 DATE_SHORT=$(TZ=UTC LOCALE=C date '+%B %Y')
6
7 sed -i "4s/.*/v$VER, $DATE_SHORT/" doc/cset{,-proc,-set,-shield}.txt
8 sed -i "s/cset v\([[:digit:]]\+\.\)\+[[:digit:]]\+ /cset v$VER /" doc/tutorial.txt
9 sed -i "s/^\(Version:[[:space:]]*\).*/\1$VER/" cpuset.spec
10 sed -i "s/^\(version = '*\).*\('[[:space:]]*$\)/\1$VER\2/" cpuset/version.py
•11 sed -i "s/^VERSION = .*/VERSION = \"$VER\"/" setup.py
12 sed -i "1i \
13 ============================================================\n\
14 Cpuset $VER ($DATE)\n\
15 https://github.com/SUSE/cpuset\n\
16 http://download.opensuse.org/hardware/cpuset/\n\
17 \n
18 " NEWS
19 ${EDITOR:-vi} NEWS
20 TEMP=$(mktemp)
21 sed '6,/^===/{/^=/d;p};d' NEWS > $TEMP
•22 git commit -s -t $TEMP cpuset.spec cpuset/version.py setup.py NEWS \
23 doc/cset{,-proc,-set,-shield}.txt doc/tutorial.txt
24 rm -f $TEMP
25 git tag v$VER