Last active
January 20, 2021 22:30
-
-
Save svetlyak40wt/157ca2a313f844979d75496663a20738 to your computer and use it in GitHub Desktop.
A generator for Travis Matrix badges.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Run (ql:quickload :cl-yaml) before loading this script | |
(defpackage #:travis-badges | |
(:use #:cl) | |
(:import-from #:cl-yaml) | |
(:export | |
#:make-badges)) | |
(in-package travis-badges) | |
(defvar *travis-url* | |
"https://travis-ci.org/roswell/roswell") | |
(defun make-badge (lisp-implementation) | |
(format nil | |
"[](~A)" | |
lisp-implementation | |
lisp-implementation | |
*travis-url*)) | |
(defun make-badges (&optional (filename #P".travis.yml")) | |
(let* ((config (cl-yaml:parse filename)) | |
(env (gethash "env" config)) | |
;; This wil contain a list of strings like | |
;; "LISP=sbcl" | |
(matrix (sort (gethash "matrix" env) | |
#'string<)) | |
(badges (mapcar #'make-badge matrix))) | |
(format t "~{~a~^~%~}" | |
badges))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Initially, this script was created for roswell/roswell#459