From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1WDVae-0007MS-Pe for ptxdist@pengutronix.de; Wed, 12 Feb 2014 09:54:44 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1WDVae-0000c0-Oc for ptxdist@pengutronix.de; Wed, 12 Feb 2014 09:54:44 +0100 Date: Wed, 12 Feb 2014 09:54:44 +0100 From: Michael Olbrich Message-ID: <20140212085444.GF4551@pengutronix.de> References: <1391630133-20347-1-git-send-email-jon@ringle.org> <1391630133-20347-2-git-send-email-jon@ringle.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1391630133-20347-2-git-send-email-jon@ringle.org> Subject: Re: [ptxdist] [PATCH] make_release.sh: make it more accessible for creating custom releases Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Wed, Feb 05, 2014 at 02:55:33PM -0500, jon@ringle.org wrote: > From: Jon Ringle > > Without args, the script will continue to work as it used to for > pengutronix approved releases > > But now a custom release can be created if your in a situation where you > need to distribute to a group of developers a needed fix to ptxdist and > you can't wait until the next pengutronix release of ptxdist. > > I've personally setup my local ptxdist.git repo to use gitflow-AVH: > > [gitflow "branch"] > master = production > develop = develop > [gitflow "prefix"] > feature = feature/ > release = release/ > hotfix = hotfix/ > support = support/ > versiontag = gp- > > I will then call this script from the production branch like this: > $ git checkout production > $ ./scripts/make_release.sh gridpoint production release GP -a > > and if I need a subsequent release within the same month: > $ git flow release start ptxdist-2014.02.x_GP > $ ./scripts/make_release.sh gridpoint production release GP -a > > Signed-off-by: Jon Ringle > --- > scripts/make_release.sh | 29 ++++++++++++++++++----------- > 1 file changed, 18 insertions(+), 11 deletions(-) > > diff --git a/scripts/make_release.sh b/scripts/make_release.sh > index f0d4357..3c8a555 100755 > --- a/scripts/make_release.sh > +++ b/scripts/make_release.sh > @@ -2,7 +2,14 @@ > > set -e > > -origin=origin > +origin=${1:-origin} > +master=${2:-master} > +stable=${3:-stable} > +suffix=${4:-} > +tagsignopt=${5:--s} This makes things really confusing. Use 'getopt' including '-h' I think. Michael > + > +[ -n "${suffix}" ] && suffix="_${suffix}" > + > v="ptxdist-" > > branch="$(git symbolic-ref HEAD)" > @@ -29,23 +36,23 @@ fi > > # guess if we're going to make a new or stable release > case "${branch}" in > - master) > - release="${v}$(date +%Y.%m).0" > - prev_release="${v}*.0" > + ${master}) > + release="${v}$(date +%Y.%m).0${suffix}" > + prev_release="${v}*.0${suffix}" > ;; > - stable/*) > - release="${branch##stable/}" > - release="${release%.x}" > + ${stable}/*) > + release="${branch##${stable}/}" > + release="${release%.x${suffix}}" > inc="$(git tag -l "${release}.*" | wc -l)" > if [ ${inc} -eq 0 ]; then > echo "about to make stable a release for '${release}', but no '.0' found" >&2 > exit 1 > fi > - prev_release="${release}.$((inc - 1))" > - release="${release}.${inc}" > + prev_release="${release}.$((inc - 1))${suffix}" > + release="${release}.${inc}${suffix}" > ;; > *) > - echo "please checkout either master or stable branch" >&2 > + echo "please checkout either ${master} or ${stable} branch" >&2 > exit 1 > ;; > esac > @@ -70,7 +77,7 @@ log="${tmp}/log" > printf "${release}\n\n" > "${log}" > git shortlog "${prev_release}"..HEAD >> "${log}" > echo "creating tag '${release}'" > -git tag -s -F "${log}" "${release}" > +git tag ${tagsignopt} -F "${log}" "${release}" > > # create tarball > here="$(pwd)" > -- > 1.7.10.4 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de