cannam@307: #!/bin/bash cannam@307: cannam@307: usage() { cannam@307: echo "Usage: $0 " cannam@307: echo " e.g. $0 2.2" cannam@307: exit 2; cannam@307: } cannam@307: cannam@307: version=$1 cannam@307: [ -n "$version" ] || usage cannam@307: cannam@307: major=${version%.*} cannam@307: minor=${version#*.} cannam@307: cannam@307: sdkmajor=$major cannam@307: sdkminor=$minor cannam@307: cannam@307: hostmajor=$(($major+1)) # there has been one API change in a minor release cannam@307: hostminor=$minor cannam@307: cannam@307: echo "Major version = $major, minor version = $minor" cannam@307: echo "SDK current = $sdkmajor, age = $sdkminor" cannam@307: echo "Host SDK current = $hostmajor, age = $hostminor" cannam@307: cannam@307: p="perl -i -p -e" cannam@307: cannam@307: $p 's/(This is version) [^ ]+/$1 '$version'/' \ cannam@307: README cannam@307: cannam@307: $p 's/(AC_INIT\(vamp-plugin-sdk,) [^,]+,/$1 '$version',/' \ cannam@307: configure.ac cannam@307: cannam@307: $p 's/(INSTALL_SDK_LIBNAME\s*=\s*libvamp-sdk.so).*/$1.'$sdkmajor'.'$sdkminor'.0/' \ cannam@307: Makefile.in cannam@307: cannam@307: $p 's/(INSTALL_SDK_LINK_ABI\s*=\s*libvamp-sdk.so).*/$1.'$sdkmajor'/' \ cannam@307: Makefile.in cannam@307: cannam@307: $p 's/(current)=.*/$1='$sdkmajor'/' \ cannam@307: build/libvamp-sdk.la.in cannam@307: cannam@307: $p 's/(age)=.*/$1='$sdkminor'/' \ cannam@307: build/libvamp-sdk.la.in cannam@307: cannam@307: $p 's/(INSTALL_HOSTSDK_LIBNAME\s*=\s*libvamp-hostsdk.so).*/$1.'$hostmajor'.'$hostminor'.0/' \ cannam@307: Makefile.in cannam@307: cannam@307: $p 's/(INSTALL_HOSTSDK_LINK_ABI\s*=\s*libvamp-hostsdk.so).*/$1.'$hostmajor'/' \ cannam@307: Makefile.in cannam@307: cannam@307: $p 's/(current)=.*/$1='$hostmajor'/' \ cannam@307: build/libvamp-hostsdk.la.in cannam@307: cannam@307: $p 's/(age)=.*/$1='$hostminor'/' \ cannam@307: build/libvamp-hostsdk.la.in cannam@307: cannam@307: $p 's/(VAMP_API_VERSION).*/$1 '$major'/' \ cannam@307: vamp/vamp.h cannam@307: cannam@307: $p 's/(VAMP_SDK_VERSION)"[^"]*"/$1 "'$version'"/' \ cannam@307: vamp-sdk/PluginBase.h cannam@307: cannam@307: $p 's/(VAMP_SDK_MAJOR_VERSION).*/$1 '$major'/' \ cannam@307: vamp-sdk/PluginBase.h cannam@307: cannam@307: $p 's/(VAMP_SDK_MINOR_VERSION).*/$1 '$minor'/' \ cannam@307: vamp-sdk/PluginBase.h cannam@307: cannam@308: $p 's/(VAMP_SDK_MAJOR_VERSION !=) \d+/$1 '$major'/' \ cannam@308: src/vamp-sdk/PluginAdapter.cpp cannam@308: cannam@308: $p 's/(VAMP_SDK_MINOR_VERSION !=) \d+/$1 '$minor'/' \ cannam@308: src/vamp-sdk/PluginAdapter.cpp cannam@308: cannam@308: $p 's/(VAMP_SDK_MAJOR_VERSION !=) \d+/$1 '$major'/' \ cannam@308: src/vamp-hostsdk/PluginHostAdapter.cpp cannam@308: cannam@308: $p 's/(VAMP_SDK_MINOR_VERSION !=) \d+/$1 '$minor'/' \ cannam@308: src/vamp-hostsdk/PluginHostAdapter.cpp cannam@308: cannam@307: for pc in pkgconfig/*.pc.in ; do cannam@307: $p 's/(Version:) .*/$1 '$version'/' $pc cannam@307: done cannam@307: cannam@307: echo "Done, now check with e.g. svn diff -- and don't forget to update CHANGELOG"