Skip to Content.
Sympa Menu

freetds - Re: [freetds] git push #1

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] git push #1
  • Date: Mon, 21 May 2012 14:04:28 -0400

On Sat, 19 May 2012 13:57:28 +0100
Frediano Ziglio <freddy77 AT gmail.com> wrote:

> I noted that you fixed the +1 version issue too. Good!
> However I found a small issues, 0_91.46 should be 0.91.46.

I'm still confused because "git branch" and "git describe" say
different things:

$ pwd
/var/releng/freetds/Branch-0_91

$ git branch
* Branch-0_91
master

$ git describe --tags
branch-0_92-54-ga8789bc

$ cd ../master
$ pwd
/var/releng/freetds/master

$ git branch
* master

$ git describe --tags
branch-0_92-325-g9a1fdd5

Is that what we want?

I use the script below to generate the version. I expect "git describe
--tags" and "git branch" to both say something about "0_91" on the
release branch and "0_92" on master. If that's not a good assumption,
I'll change it.

--jkl

#! /bin/sh
set -e

VERSION=$(git describe --tags \
| sed -E 's/^[^-]*-//; s/-g[[:xdigit:]]+//')

BRANCH=$(git branch | awk '/\*/ {print $2}')

test "${BRANCH}"

if [ master = ${BRANCH} ]
then
VERSION=$(echo $VERSION | awk -F'[_-]' '{print "dev."$1"_"$2"-"$3}')
fi
VERSION=$(echo $VERSION | sed 's/[_-]/./g')
echo $VERSION





Archive powered by MHonArc 2.6.24.

Top of Page