emacs: hydra: Use '-' to separate job names and version numbers.

* emacs/guix-hydra.el (guix-hydra-job-name-specification): New procedure.
* emacs/guix-ui-package.el (guix-package-info-insert-systems)
(guix-package-list-latest-builds): Use it.
This commit is contained in:
Alex Kost 2016-03-03 12:55:21 +03:00
parent c7658f8f2c
commit b8fa5a2ae8
2 changed files with 7 additions and 2 deletions

View File

@ -36,6 +36,10 @@
(concat ".*\\." (regexp-opt guix-help-system-types) "\\'") (concat ".*\\." (regexp-opt guix-help-system-types) "\\'")
"Regexp matching a full name of Hydra job (including system).") "Regexp matching a full name of Hydra job (including system).")
(defun guix-hydra-job-name-specification (name version)
"Return Hydra's job name specification by NAME and VERSION."
(concat name "-" version))
(defun guix-hydra-message (entries search-type &rest _) (defun guix-hydra-message (entries search-type &rest _)
"Display a message after showing Hydra ENTRIES." "Display a message after showing Hydra ENTRIES."
;; XXX Add more messages maybe. ;; XXX Add more messages maybe.

View File

@ -34,6 +34,7 @@
(require 'guix-guile) (require 'guix-guile)
(require 'guix-entry) (require 'guix-entry)
(require 'guix-utils) (require 'guix-utils)
(require 'guix-hydra)
(require 'guix-hydra-build) (require 'guix-hydra-build)
(require 'guix-read) (require 'guix-read)
(require 'guix-license) (require 'guix-license)
@ -388,7 +389,7 @@ formatted with this string, an action button is inserted.")
:system (button-label btn)))) :system (button-label btn))))
(apply #'guix-hydra-build-get-display (apply #'guix-hydra-build-get-display
'latest args))) 'latest args)))
'job-name (guix-package-name-specification 'job-name (guix-hydra-job-name-specification
(guix-entry-value entry 'name) (guix-entry-value entry 'name)
(guix-entry-value entry 'version)))) (guix-entry-value entry 'version))))
@ -776,7 +777,7 @@ for all ARGS."
(interactive (interactive
(let ((entry (guix-list-current-entry))) (let ((entry (guix-list-current-entry)))
(guix-hydra-build-latest-prompt-args (guix-hydra-build-latest-prompt-args
:job (guix-package-name-specification :job (guix-hydra-job-name-specification
(guix-entry-value entry 'name) (guix-entry-value entry 'name)
(guix-entry-value entry 'version))))) (guix-entry-value entry 'version)))))
(apply #'guix-hydra-latest-builds number args)) (apply #'guix-hydra-latest-builds number args))