mesonbuild / mesonwrap

Meson wraps service and tools, please use https://github.com/mesonbuild/wrapdb for wraps issues
https://wrapdb.mesonbuild.com
Apache License 2.0
26 stars 7 forks source link

Get rid of commit_zero #30

Closed sarum9in closed 6 years ago

sarum9in commented 6 years ago

The current revision implementation is not related to commit_zero at all, it is just the path from the root, I think we don't care as much what revision value is as long as it is incrementing for a particular version, so I am considering to remove commit_zero.

TODO discuss and make sure that it works as expected

sarum9in commented 6 years ago

OK, now I understand how this works. We rely on git-describe that apparently implicitly uses first available tag. And while this works, it is not perfect in a sense that if we commit something to master, e.g. LICENSE.build, we break consequent revisions.

sarum9in commented 6 years ago

My proposal is to use git rev-list --count HEAD. This is consistent with PKGBUILD practice from AUR: echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD).

Advantages:

Disadvantages:

@jpakkane I would appreciate if you take a look.