mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
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>
This commit is contained in:
parent
bde4fc00c0
commit
b8baebae6a
2 changed files with 22 additions and 4 deletions
|
@ -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
|
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
|
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
|
limits such as the maximum shebang length (127 bytes for the Linux
|
||||||
kernel). It is best to use the full commit identifiers in
|
kernel). There are helper functions for doing this for packages using
|
||||||
@code{origin}s, though, to avoid ambiguities. A typical package
|
@code{git-fetch} or @code{hg-fetch} (see below). It is best to use the
|
||||||
definition may look like this:
|
full commit identifiers in @code{origin}s, though, to avoid ambiguities.
|
||||||
|
A typical package definition may look like this:
|
||||||
|
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(define my-package
|
(define my-package
|
||||||
|
@ -553,6 +555,20 @@ definition may look like this:
|
||||||
)))
|
)))
|
||||||
@end lisp
|
@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
|
@node Synopses and Descriptions
|
||||||
@subsection Synopses and Descriptions
|
@subsection Synopses and Descriptions
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,7 @@ Copyright @copyright{} 2020 Jonathan Brielmaier@*
|
||||||
Copyright @copyright{} 2020 Edgar Vincent@*
|
Copyright @copyright{} 2020 Edgar Vincent@*
|
||||||
Copyright @copyright{} 2021 Maxime Devos@*
|
Copyright @copyright{} 2021 Maxime Devos@*
|
||||||
Copyright @copyright{} 2021 B. Wilson@*
|
Copyright @copyright{} 2021 B. Wilson@*
|
||||||
|
Copyright @copyright{} 2021 Xinglu Chen@*
|
||||||
|
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||||
|
@ -6657,7 +6658,8 @@ This is the data type representing a package recipe.
|
||||||
The name of the package, as a string.
|
The name of the package, as a string.
|
||||||
|
|
||||||
@item @code{version}
|
@item @code{version}
|
||||||
The version of the package, as a string.
|
The version of the package, as a string. @xref{Version Numbers}, for
|
||||||
|
guidelines.
|
||||||
|
|
||||||
@item @code{source}
|
@item @code{source}
|
||||||
An object telling how the source code for the package should be
|
An object telling how the source code for the package should be
|
||||||
|
|
Loading…
Reference in a new issue