Re: Git Package Versioning
On Sun, 20 Mar 2011 22:25:38 +0100, Joachim Wiedorn <email@example.com> wrote:
> Please be aware, that "+" is not the optimal connector.
> Try dpkg --compare-versions and see:
> The version b) is the better way. So please use "~"
> as connector.
That rather depends on your goal. If the version number is before the
current snapshot, then + is appropriate.
I like to use the output of git-describe, along with sed, something like
| SOURCEPKG=$(shell dpkg-parsechangelog | sed -n 's/^Source: \(.*\)/\1/p')
| UPSTREAM=$(shell dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-[^-]*/\1/p')
| SHA1=$(lastword $(subst ~g, ,$(UPSTREAM)))
| git describe --tags upstream | sed 's,^release-,,;s,-,+,;s,-,~,;'
| git archive --format=tar $(SHA1) | gzip -9 > ../$(ORIG)
The output from ./debian/rules describe-current-version is pasted into
debian/changelog, and it makes things like
So here + really makes sense because it is 706 commits after tag
The second ~ could be a + as well, doesn't matter.
Your mileage, may, as they say, vary.