mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
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.
This commit is contained in:
@@ -272,6 +272,7 @@
|
||||
(commit "first commit")
|
||||
(add "src/a.txt" "A")
|
||||
(commit "second commit")
|
||||
(tag "tag-for-first-news-entry")
|
||||
(add "news.scm"
|
||||
,(lambda (repository)
|
||||
(let ((previous
|
||||
@@ -299,7 +300,7 @@
|
||||
(entry (commit ,(oid->string previous))
|
||||
(title (en "Another file!"))
|
||||
(body (en "Yeah, b.txt.")))
|
||||
(entry (commit ,(oid->string second))
|
||||
(entry (tag "tag-for-first-news-entry")
|
||||
(title (en "Old news.")
|
||||
(eo "Malnovaĵoj."))
|
||||
(body (en "For a.txt"))))))))
|
||||
@@ -343,6 +344,10 @@
|
||||
(lset= string=?
|
||||
(map channel-news-entry-commit
|
||||
(channel-news-for-commit channel commit5 commit1))
|
||||
(list commit4 commit2)))))))
|
||||
(list commit4 commit2))
|
||||
(lset= equal?
|
||||
(map channel-news-entry-tag
|
||||
(channel-news-for-commit channel commit5 commit1))
|
||||
'(#f "tag-for-first-news-entry")))))))
|
||||
|
||||
(test-end "channels")
|
||||
|
||||
Reference in New Issue
Block a user