Re: Versioning svn checkouts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bill Nottingham <notting@xxxxxxxxxx> wrote:
> Petr Machata (pmachata@xxxxxxxxxx) said:
>> Steve Grubb wrote:
>> > kdepim-enterprise-svn20070926.tar.bz2
>>
>> As a side note, I always wondered why to use date in the release tag of
>> package, whose sources come from non-cvs versioning system.  For svn, in
>> my opinion, it would make more sense to use the tree revision number;
>> for git, similarly, sha1 id of the tree.
>
> Well, git<date> sorts sanely. git<sha1> does not. Comments in the spec
> (or similar) might help with this.

For git-based projects, I like to use something based on the output of
git-describe.  Then you get the best of both worlds: a regular version
string, a sequence number, and an SHA1 prefix.  For example, the latest
version of autoconf does this:

    $ autoconf --version |head -1
    autoconf (GNU Autoconf) 2.61a.312-b524b

That means it's built from the 312th change-set since the 2.61a tag.
The SHA1 of that change-set starts with "b524b".

In the case of autoconf, you can map from the above string back to
its SHA1 by prepending a 'v' (to get the tag name) and inserting a 'g'
after the '-' (because git requires this).  Then use git-rev-parse:

    $ git-rev-parse v2.61a.312-gb524b
    b524b0f996c9c1e9a81a3e3cdcc11517c39adb7c

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux