channels: Allow news entries to refer to a tag.
authorLudovic Courtès <ludo@gnu.org>
Sat, 21 Sep 2019 19:29:30 +0000 (21:29 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 23 Sep 2019 08:38:44 +0000 (10:38 +0200)
commit9719e8d37aaa63e1c8f9d4ab1e28d49e2e56d85b
tree0069ed50d061dadb41a64354db8995c0a8603cf7
parent8ba7fd3cd6962f1c1aaaa5f71eed7f9222094f25
channels: Allow news entries to refer to a tag.

Suggested by Ricardo Wurmus <rekado@elephly.net>.

* guix/channels.scm (<channel-news-entry>)[tag]: New field.
(sexp->channel-news-entry): Accept either 'commit' or 'tag' in 'entry'
forms.
(resolve-channel-news-entry-tag): New procedure.
(channel-news-for-commit): Move 'with-repository' form one level
higher.  Call 'resolve-channel-news-entry-tag' on all the news entries.
* guix/tests/git.scm (populate-git-repository): Add clause for 'tag'.
* tests/channels.scm ("channel-news, one entry"): Create a tag and add
an entry with a tag.  Check that the tag is resolved and also visible in
the <channel-news-entry> record.
* doc/guix.texi (Channels): Mention tags in news entries.
doc/guix.texi
guix/channels.scm
guix/tests/git.scm
tests/channels.scm