Mercurial > hg > vamp-plugin-sdk
comparison build/update-version.sh @ 307:ebc47e614cf5
* Update versions to 2.2 throughout; also add script used to do this
author | cannam |
---|---|
date | Wed, 25 Aug 2010 16:09:15 +0000 |
parents | |
children | 34754c776530 |
comparison
equal
deleted
inserted
replaced
306:b923a3d9c3d5 | 307:ebc47e614cf5 |
---|---|
1 #!/bin/bash | |
2 | |
3 usage() { | |
4 echo "Usage: $0 <version>" | |
5 echo " e.g. $0 2.2" | |
6 exit 2; | |
7 } | |
8 | |
9 version=$1 | |
10 [ -n "$version" ] || usage | |
11 | |
12 major=${version%.*} | |
13 minor=${version#*.} | |
14 | |
15 sdkmajor=$major | |
16 sdkminor=$minor | |
17 | |
18 hostmajor=$(($major+1)) # there has been one API change in a minor release | |
19 hostminor=$minor | |
20 | |
21 echo "Major version = $major, minor version = $minor" | |
22 echo "SDK current = $sdkmajor, age = $sdkminor" | |
23 echo "Host SDK current = $hostmajor, age = $hostminor" | |
24 | |
25 p="perl -i -p -e" | |
26 | |
27 $p 's/(This is version) [^ ]+/$1 '$version'/' \ | |
28 README | |
29 | |
30 $p 's/(AC_INIT\(vamp-plugin-sdk,) [^,]+,/$1 '$version',/' \ | |
31 configure.ac | |
32 | |
33 $p 's/(INSTALL_SDK_LIBNAME\s*=\s*libvamp-sdk.so).*/$1.'$sdkmajor'.'$sdkminor'.0/' \ | |
34 Makefile.in | |
35 | |
36 $p 's/(INSTALL_SDK_LINK_ABI\s*=\s*libvamp-sdk.so).*/$1.'$sdkmajor'/' \ | |
37 Makefile.in | |
38 | |
39 $p 's/(current)=.*/$1='$sdkmajor'/' \ | |
40 build/libvamp-sdk.la.in | |
41 | |
42 $p 's/(age)=.*/$1='$sdkminor'/' \ | |
43 build/libvamp-sdk.la.in | |
44 | |
45 $p 's/(INSTALL_HOSTSDK_LIBNAME\s*=\s*libvamp-hostsdk.so).*/$1.'$hostmajor'.'$hostminor'.0/' \ | |
46 Makefile.in | |
47 | |
48 $p 's/(INSTALL_HOSTSDK_LINK_ABI\s*=\s*libvamp-hostsdk.so).*/$1.'$hostmajor'/' \ | |
49 Makefile.in | |
50 | |
51 $p 's/(current)=.*/$1='$hostmajor'/' \ | |
52 build/libvamp-hostsdk.la.in | |
53 | |
54 $p 's/(age)=.*/$1='$hostminor'/' \ | |
55 build/libvamp-hostsdk.la.in | |
56 | |
57 $p 's/(VAMP_API_VERSION).*/$1 '$major'/' \ | |
58 vamp/vamp.h | |
59 | |
60 $p 's/(VAMP_SDK_VERSION)"[^"]*"/$1 "'$version'"/' \ | |
61 vamp-sdk/PluginBase.h | |
62 | |
63 $p 's/(VAMP_SDK_MAJOR_VERSION).*/$1 '$major'/' \ | |
64 vamp-sdk/PluginBase.h | |
65 | |
66 $p 's/(VAMP_SDK_MINOR_VERSION).*/$1 '$minor'/' \ | |
67 vamp-sdk/PluginBase.h | |
68 | |
69 for pc in pkgconfig/*.pc.in ; do | |
70 $p 's/(Version:) .*/$1 '$version'/' $pc | |
71 done | |
72 | |
73 echo "Done, now check with e.g. svn diff -- and don't forget to update CHANGELOG" |