Skip to content
Snippets Groups Projects
Unverified Commit 826e2df4 authored by Mathieu Othacehe's avatar Mathieu Othacehe
Browse files

specification: channel->sexp: Add introduction support.

* src/cuirass/specification.scm (channel->sexp): Add channel introduction
support.
parent fc582f5b
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,9 @@
(define-module (cuirass specification)
#:use-module (guix channels)
#:use-module ((guix openpgp)
#:select (openpgp-public-key-fingerprint
openpgp-format-fingerprint))
#:use-module (guix records)
#:use-module (guix ui)
#:use-module (guix utils)
......@@ -91,12 +94,25 @@
(define (channel->sexp channel)
"Return an sexp describing CHANNEL."
`(repository
(version 0)
(url ,(channel-url channel))
(branch ,(channel-branch channel))
(commit ,(channel-commit channel))
(name ,(channel-name channel))))
(let ((intro (channel-introduction channel)))
`(repository
(version 0)
(url ,(channel-url channel))
(branch ,(channel-branch channel))
(commit ,(channel-commit channel))
(name ,(channel-name channel))
,@(if intro
`((introduction
(channel-introduction
(version 0)
(commit
,(channel-introduction-first-signed-commit
intro))
(signer
,(openpgp-format-fingerprint
(channel-introduction-first-commit-signer
intro))))))
'()))))
;;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment