On Sat, May 12, 2018 at 07:41:31PM -0700, Eitan Adler wrote:
> Hi all,
>
> I often have several variants of the same revision that I'm testing or
> working on at any given time.
>
> What do you y'all think of something like this:
> ....
Well....
The variant of newvers.sh that I use addresses this (among other
things) by sourcing a file (through a symlink) that defines a shell
function named "get_version_from_vcs()," and invokes that function
in order to obtain a suitable "version string."
The primary rationale for this is that I don't believe the various
quirks of VCSen or installations ought to be in newvers.sh proper: it
adds a fair amount of complexity that is difficult to test completely to
code that has a fairly critical (and fundamentally simple) function.
I created a few sample such functions, though I don't use all of the
VCSen currently supported by base newvers.sh, so I haven't been able to
test them all.
(Sorry about the name. I'm lousy at naming things, and have no
"investment" in the names used. I'd be pleased if someone would take
the idea and get something based on it implemented, though.)
Anyway, using such a mechanism, you could easily extend to version
string to include just about anything you wanted -- with minimal
risk of breaking newvers.sh (either for yourslef or others).
Peace,
david
--
David H. Wolfskill
da...@catwhisker.org
Mr. Trump: Just how does reneging on the Iran nuclear deal make the US "safer?"
See
http://www.catwhisker.org/~david/publickey.gpg for my public key.