diff options
author | Xinglu Chen <public@yoctocell.xyz> | 2021-06-06 12:37:23 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-06-06 23:12:17 +0200 |
commit | b8baebae6a6188ed97048891f9ecb0b2f6a71085 (patch) | |
tree | 81a656fab1e808f70279dde8d2c1e90b06143368 /doc/contributing.texi | |
parent | bde4fc00c0b962f46844ab3845494300eebd8a0a (diff) | |
download | guix-b8baebae6a6188ed97048891f9ecb0b2f6a71085.tar guix-b8baebae6a6188ed97048891f9ecb0b2f6a71085.tar.gz |
doc: Add reference for ‘git-version’ and ‘hg-version’.
* doc/contributing.texi (Version Numbers): Document ‘git-version’ and
‘hg-version’.
* doc/guix.texi (package Reference): Reference ‘Version Numbers’ section for
version naming guidelines.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'doc/contributing.texi')
-rw-r--r-- | doc/contributing.texi | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/doc/contributing.texi b/doc/contributing.texi index fa8c0cf3ba..d67e632520 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -532,9 +532,11 @@ It is a good idea to strip commit identifiers in the @code{version} field to, say, 7 digits. It avoids an aesthetic annoyance (assuming aesthetics have a role to play here) as well as problems related to OS limits such as the maximum shebang length (127 bytes for the Linux -kernel). It is best to use the full commit identifiers in -@code{origin}s, though, to avoid ambiguities. A typical package -definition may look like this: +kernel). There are helper functions for doing this for packages using +@code{git-fetch} or @code{hg-fetch} (see below). It is best to use the +full commit identifiers in @code{origin}s, though, to avoid ambiguities. +A typical package definition may look like this: + @lisp (define my-package @@ -553,6 +555,20 @@ definition may look like this: ))) @end lisp +@deffn {Scheme Procedure} git-version @var{VERSION} @var{REVISION} @var{COMMIT} +Return the version string for packages using @code{git-fetch}. + +@lisp +(git-version "0.2.3" "0" "93818c936ee7e2f1ba1b315578bde363a7d43d05") +@result{} "0.2.3-0.93818c9" +@end lisp +@end deffn + +@deffn {Scheme Procedure} hg-version @var{VERSION} @var{REVISION} @var{CHANGESET} +Return the version string for packages using @code{hg-fetch}. It works +in the same way as @code{git-version}. +@end deffn + @node Synopses and Descriptions @subsection Synopses and Descriptions |