ci: Add build-products id field and export accessors.
authorMathieu Othacehe <othacehe@gnu.org>
Mon, 15 Jun 2020 13:31:21 +0000 (15:31 +0200)
committerMathieu Othacehe <othacehe@gnu.org>
Mon, 15 Jun 2020 13:34:19 +0000 (15:34 +0200)
* guix/ci.scm (build-product?, build-product-id,
build-product-type, build-product-file-size,
build-product-path): Export them,
[id]: new field.

guix/ci.scm

index 6bc80ca..02eb90e 100644 (file)
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Mathieu Othacehe <othacehe@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (json)
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 match)
-  #:export (build?
+  #:export (build-product?
+            build-product-id
+            build-product-type
+            build-product-file-size
+            build-product-path
+
+            build?
             build-id
             build-derivation
             build-system
             build-status
             build-timestamp
+            build-products
 
             checkout?
             checkout-commit
 (define-json-mapping <build-product> make-build-product
   build-product?
   json->build-product
-  (type        build-product-type)
-  (file-size   build-product-file-size)
-  (path        build-product-path))
+  (id          build-product-id)                  ;integer
+  (type        build-product-type)                ;string
+  (file-size   build-product-file-size)           ;integer
+  (path        build-product-path))               ;string
 
 (define-json-mapping <build> make-build build?
   json->build