notepadqq / notepadqq-packaging

Packaging scripts and files for Notepadqq
MIT License
21 stars 12 forks source link

[ARCH] Package version doesn't match the git version from the PKGBUILD #20

Closed flamusdiu closed 10 years ago

flamusdiu commented 10 years ago

I am using this to get the version of the package:

git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g;s/^v//g'

Which gives me: 0.36.0.r24.gc8b4ca4-1; however, the version is really 0.37.0

Info on Arch Wiki here: https://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines#The_pkgver.28.29_function

Anyway, you can use tags to mark the start of a dev version? Usually, git packages don't have static package versions.

danieleds commented 10 years ago

To be honest, the code on the master branch doesn't even have a real version: the version number is usually chosen only a few days before its release, based on the amount and importance of the changes made (ignore these latest cases where it was always the same). The string in the About dialog could be a completely random meaningless string and it would be ok.

So I can't tag the start of a dev version, because the start of a dev version doesn't really have a version.

The best solution, I think, is to use the number of revisions (e.g. r444.c8b4ca4) as shown in the page you linked:

printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

with (if possible) a name similar to "notepadqq-dev" or "notepadqq-daily" to point up that it's a development version.

flamusdiu commented 10 years ago

yeah, I was looking at that. I will keep it "-git" which just shows it's pulled from git and usually a dev version. I'll switch it out and push and update to it.