From 0137a92f3397a05e9c815f19d44287458dbb5c05 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Wed, 11 Sep 2019 12:38:31 +0200 Subject: [PATCH] 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 --- scripts/release.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 32cb768..1c8ffb7 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -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