[freetds] git advice

James K. Lowden jklowden at freetds.org
Tue Mar 27 21:30:55 EDT 2012


Some progress and some befuddlement.  I have another version-number
question.  

On Sun, 11 Mar 2012 22:22:25 -0500
"Craig A. Berry" <craigberry at mac.com> wrote:
> On Sun, 11 Mar 2012 16:47:35 -0400
> "James K. Lowden" <jklowden at freetds.org> wrote:
>
> > oak[freetds.git]$ for BRANCH in master Branch-0_91 
> > do 
> > 	git show-branch \
> > 	| awk -F '[][~]' "/${BRANCH}/ { print \$3,\$2 }" \
> > 	| sort -rn | head -1
> > done 
> > 
> > yielding: 
> > 
> > 	275 master 
> > 	46 Branch-0_91
> > 
> > The version numbers then become:
> > 
> > 	freetds-0.92.dev.275
> > 	freetds-0.91.46
> 
> That should work.  But it might just be simpler to use the output of
> "git describe."  
...
> Now, the reason git describe doesn't currently work on the freetds
> gitorious repository is that there are no tags

[which Frediano corrected]  Now we see this:

$ git branch
* Branch-0_91
  master

$ git describe
fatal: No annotated tags can describe
'4f40228ff919f729961fd7daf000c6948716bea1'. 
However, there were unannotated tags: try --tags. 

$ git describe --tags 
branch-0_91-49-g4f40228

> The SHA1 clinches the deal in making it completely unambiguous what
> we have since someone else in some other branch or some other
> repository could also be 91 commits since the same tag but with a
> different commit history.

I don't want to add the SHA1 to the tarball name because it's too ugly
for words.  There really isn't any ambiguity because the authoritative
repository is known and public.  

I could add it to the .md5 file:

$ ls *tar*; head *md5
freetds-0.91-49.tar.bz2                 freetds-0.91-49.tar.gz
freetds-0.91-49.tar.bz2.md5             freetds-0.91-49.tar.gz.md5

==> freetds-0.91-49.tar.bz2.md5 <==
MD5 (freetds-0.91.tar.bz2) = 9c58683ce78e0be2b7232574d67722ee
branch-0_91-49-g4f40228

==> freetds-0.91-49.tar.gz.md5 <==
MD5 (freetds-0.91.tar.gz) = 928f445bb73ebc4b4f03999ad97746f8
branch-0_91-49-g4f40228

How does that sound?  

--jkl


More information about the FreeTDS mailing list