From 3f174825cd0313754fd4118dc2267e5c8cdff037 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 6 May 2016 16:20:48 +0200 Subject: Add bugfix release checklist --- publish | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'publish') diff --git a/publish b/publish index 8d29214..6bcd969 100755 --- a/publish +++ b/publish @@ -2,9 +2,9 @@ # Publish build2 to build2.org/cppget.org (and brep.cppget.org). # -# Usage: publish [] +# Usage: publish [] [] # -usage="$0 []" +usage="$0 [] []" owd=`pwd` trap "{ cd $owd; exit 1; }" ERR @@ -13,7 +13,12 @@ set -o errtrace # Trap in functions. function info () { echo "$*" 1>&2; } function error () { info "$*"; exit 1; } -v=`sed -e 's/^\(.*\)\.\(.*\)\..*$/\1.\2/' build2-toolchain/version` +if [[ $# -ne 0 && "$1" != -* ]]; then + v="$1" + shift +else + v=`sed -e 's/^\(.*\)\.\(.*\)\..*$/\1.\2/' build2-toolchain/version` +fi if [ -z "$v" ]; then error "unable to extract version from `cat build2-toolchain/version`" -- cgit v1.1