From 7c65851b7501155167889da2b72c79089a9bad46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 21 Mar 2017 14:16:07 +0100 Subject: [PATCH] Allow version passed to update_version.sh to start with "version-" prefix This allows you to copy-paste a tag and edit it for the new version. --- update_version.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/update_version.sh b/update_version.sh index 1e872f5..2bcd200 100755 --- a/update_version.sh +++ b/update_version.sh @@ -1,13 +1,15 @@ #!/bin/bash -if [ -z "$1" ]; then +VERSION="${1/version-}" + +if [ -z "$VERSION" ]; then echo "Usage: $0 new-version" >&2 exit 1 fi -BL_INFO_VER=$(echo "$1" | sed 's/\./, /g') +BL_INFO_VER=$(echo "$VERSION" | sed 's/\./, /g') -sed "s/version='[^']*'/version='$1'/" -i setup.py +sed "s/version='[^']*'/version='$VERSION'/" -i setup.py sed "s/'version': ([^)]*)/'version': ($BL_INFO_VER)/" -i blender_cloud/__init__.py git diff