You are not logged in.
Pages: 1
In pkgver() of some of my git packages i have this command :
$ echo $(cat VERSION | tr "-" "_").$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
13.1.0_devel.86987.7a8def8
$
Does this qualify as an UUOC and if so what should i use instead ?
Last edited by Lone_Wolf (2016-11-29 18:05:24)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Yes, I would say that qualifies, but is not as bad as some. Better solution would be 'tr "-" "_" < VERSION'
Offline
Or
sed 's/-/_/' VERSION
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Or, if you want to avoid using any additional programs or spawning any additional processes (for this part):
read _ver <VERSION
echo ${_ver/-/_}.$(git ...
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Or,
git describe --tags| sed 's/-/./g'
Offline
qinohe, that assumes there is a tag that matches the contents of the VERSION file.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Your right, they all should
Offline
Although this project appears to be using tags, git describe can only find a 6 weeks old one.
The contents of VERSION are much clearer.
I'm going with read as described by trilby.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Sometimes, git describe simply doesn't work, noway, nohow. Take a look at e.g. qbittorrent-git (which I co-maintain)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Pages: 1