release: Pick up old version from git

The reasonable expectation is that the last tag is also the last
release.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka 2019-09-11 12:38:31 +02:00
parent 0a1072ec79
commit 0137a92f33

View File

@ -1,16 +1,16 @@
#!/bin/bash
OLD_VERSION=${1:-}
NEW_VERSION=${2:-}
OLD_VERSION=$(git describe --abbrev=0)
NEW_VERSION=$1
usage() {
echo "$0: OLD_VERSION NEW_VERSION"
echo "$0: NEW_VERSION"
echo ""
echo "example:"
echo " $0 0.15.0 0.16.0"
echo " $0 0.16.0"
}
if [ -z "$OLD_VERSION" ] || [ -z "$NEW_VERSION" ] ; then
if [ -z "$NEW_VERSION" ] ; then
usage
exit 1
fi