Mercurial > hg > vamp-plugin-sdk
comparison build/update-version.sh @ 332:f9e13bc35b3e
Bump up version to 2.3.1, add C-linkage symbols for library versions so autoconf can check them
author | Chris Cannam |
---|---|
date | Fri, 25 May 2012 10:45:34 +0100 |
parents | ef1dc9963638 |
children | d5c5a52e6c9f |
comparison
equal
deleted
inserted
replaced
331:9648ba9812d6 | 332:f9e13bc35b3e |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 usage() { | 3 usage() { |
4 echo "Usage: $0 <version>" | 4 echo "Usage: $0 <version>" |
5 echo " e.g. $0 2.2" | 5 echo " e.g. $0 2.2" |
6 echo " e.g. $0 2.2.1" | |
6 exit 2; | 7 exit 2; |
7 } | 8 } |
8 | 9 |
9 version=$1 | 10 version=$1 |
10 [ -n "$version" ] || usage | 11 [ -n "$version" ] || usage |
11 | 12 |
12 major=${version%.*} | 13 major=${version%%.*} # 2.3 -> 2, 2.3.1 -> 2 |
13 minor=${version#*.} | 14 minor=${version#*.} # 2.3 -> 3, 2.3.1 -> 3.1 |
15 minor=${minor%.*} # 3 -> 3, 3.1 -> 3 | |
14 | 16 |
15 sdkmajor=$major | 17 sdkmajor=$major |
16 sdkminor=$minor | 18 sdkminor=$minor |
17 | 19 |
18 hostmajor=$(($major+1)) # there has been one API change in a minor release | 20 hostmajor=$(($major+1)) # there has been one API change in a minor release |
19 hostminor=$minor | 21 hostminor=$minor |
20 | 22 |
23 acs="`echo $version | tr '.' '_'`" | |
24 | |
21 echo "Major version = $major, minor version = $minor" | 25 echo "Major version = $major, minor version = $minor" |
22 echo "SDK current = $sdkmajor, age = $sdkminor" | 26 echo "SDK current = $sdkmajor, age = $sdkminor" |
23 echo "Host SDK current = $hostmajor, age = $hostminor" | 27 echo "Host SDK current = $hostmajor, age = $hostminor" |
28 echo "Version string = $version" | |
29 echo "acsymbols string = $acs" | |
24 | 30 |
25 p="perl -i -p -e" | 31 p="perl -i -p -e" |
26 | 32 |
27 $p 's/(This is version) [^ ]+/$1 '$version'/' \ | 33 $p 's/(This is version) [^ ]+/$1 '$version'/' \ |
28 README | 34 README |
80 | 86 |
81 for pc in pkgconfig/*.pc.in ; do | 87 for pc in pkgconfig/*.pc.in ; do |
82 $p 's/(Version:) .*/$1 '$version'/' $pc | 88 $p 's/(Version:) .*/$1 '$version'/' $pc |
83 done | 89 done |
84 | 90 |
85 echo "Done, now check with e.g. svn diff -- and don't forget to update CHANGELOG" | 91 $p 's/^$/\nextern void libvampsdk_v_'$acs'_present(void) { }/' \ |
92 src/vamp-sdk/acsymbols.c | |
93 | |
94 $p 's/^$/\nextern void libvamphostsdk_v_'$acs'_present(void) { }/' \ | |
95 src/vamp-hostsdk/acsymbols.c | |
96 | |
97 echo "Done, now check with e.g. hg diff -- and don't forget to update CHANGELOG" |