Date: Sat, 12 May 2018 20:03:57 -0700 From: David Wolfskill <david@catwhisker.org> To: Eitan Adler <lists@eitanadler.com> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: including a checksum of the diff in uname Message-ID: <20180513030357.GK34631@albert.catwhisker.org> In-Reply-To: <CAF6rxgmL559nLMT8WeEQhscHjVgO8O0Nr-sA7Jf5pvtUKk7T_Q@mail.gmail.com> References: <CAF6rxgmL559nLMT8WeEQhscHjVgO8O0Nr-sA7Jf5pvtUKk7T_Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--aSbZTaX27kKPUTye Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 12, 2018 at 07:41:31PM -0700, Eitan Adler wrote: > Hi all, >=20 > I often have several variants of the same revision that I'm testing or > working on at any given time. >=20 > 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 --=20 David H. Wolfskill david@catwhisker.org Mr. Trump: Just how does reneging on the Iran nuclear deal make the US "saf= er?" See http://www.catwhisker.org/~david/publickey.gpg for my public key. --aSbZTaX27kKPUTye Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEEzLfO+ReoAfQwZNd7FTnMQKBJ7hcFAlr3qx1fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEND QjdDRUY5MTdBODAxRjQzMDY0RDc3QjE1MzlDQzQwQTA0OUVFMTcACgkQFTnMQKBJ 7hcgHQf+OJBvv9Wl5N2YX3pesj4AwPUaWjNa1MFfF7OSJdWmcO9x6EbY6k7VzGEu ajSq5XZHa0nQ2KjdIhfIrTjUAW4d2X0s6QZGRFO5v22pn+7PNCWJy6D1azpLYk2b WTpzzNac/3rJLYEyi8WqhW7R1ua1G/u+I6mKlFmlaZa4/CmwvPvB1VSanEonY/mg /pHtQGeEPhoXLDnadAzUKx1mrp1HvqeJvFPVfWAv/hA6XYENuI6ltiN15FJT7Qqs zjA7dMo+UhmJkzBuuNrJWMqTT4qvT2REClTovuy9FYmRkH8UZ0ouiI699xPlrD9J ZaLpuB3Vrjzm0BjB7sd+yyrPWWP5Wg== =6ipr -----END PGP SIGNATURE----- --aSbZTaX27kKPUTye--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180513030357.GK34631>