Skip to content

Commit

Permalink
Get version string with legit. Abandon quicklisp in Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Green committed Jan 20, 2024
1 parent de1e63a commit c456c18
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 44 deletions.
34 changes: 17 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ check: clean
sbcl --dynamic-space-size 4096 \
--disable-debugger \
--eval '(ql:quickload :prove)' \
--eval '(pushnew (truename ".") ql:*local-project-directories* )' \
--eval '(pushnew (truename "./user") ql:*local-project-directories* )' \
--eval '(pushnew (truename "./util") ql:*local-project-directories* )' \
--eval '(pushnew (truename "./db") ql:*local-project-directories* )' \
--eval '(pushnew (truename "./parsers") ql:*local-project-directories* )' \
--eval '(pushnew (truename "./test/") ql:*local-project-directories* )' \
--eval '(pushnew (truename ".") asdf:*central-registry* )' \
--eval '(pushnew (truename "./user") asdf:*central-registry* )' \
--eval '(pushnew (truename "./util") asdf:*central-registry* )' \
--eval '(pushnew (truename "./db") asdf:*central-registry* )' \
--eval '(pushnew (truename "./parsers") asdf:*central-registry* )' \
--eval '(pushnew (truename "./test/") asdf:*central-registry* )' \
--eval '(ql:register-local-projects)' \
--eval '(ql:quickload :rlgl-server)' \
--eval "(asdf:oos 'asdf:load-op :rlgl-server :force t)" \
Expand All @@ -40,22 +40,22 @@ run: clean
openssl genrsa -out /tmp/rlgl-test-key.pem 1024
PRIVATE_KEY_FILE=/tmp/rlgl-test-key.pem \
sbcl --dynamic-space-size 4096 \
--eval '(pushnew (truename ".") ql:*local-project-directories* )' \
--eval '(pushnew (truename "./user") ql:*local-project-directories* )' \
--eval '(pushnew (truename "./util") ql:*local-project-directories* )' \
--eval '(pushnew (truename "./db") ql:*local-project-directories* )' \
--eval '(pushnew (truename "./parsers") ql:*local-project-directories* )' \
--eval '(pushnew (truename "./test/") ql:*local-project-directories* )' \
--eval '(ql:register-local-projects)' \
--eval '(ql:quickload :rlgl-server)' \
--eval '(pushnew (truename ".") asdf:*central-registry* )' \
--eval '(pushnew (truename "./local-projects/cl-json-util") asdf:*central-registry* )' \
--eval '(pushnew (truename "./user") asdf:*central-registry* )' \
--eval '(pushnew (truename "./util") asdf:*central-registry* )' \
--eval '(pushnew (truename "./db") asdf:*central-registry* )' \
--eval '(pushnew (truename "./parsers") asdf:*central-registry* )' \
--eval '(pushnew (truename "./test/") asdf:*central-registry* )' \
--eval '(asdf:load-system :rlgl-server)' \
--eval '(rlgl-server:start-rlgl-server t "test/config.ini")'

cover: clean
sbcl --disable-debugger \
--eval '(require :sb-cover)' \
--eval '(ql:quickload :prove)' \
--eval '(declaim (optimize sb-cover:store-coverage-data))' \
--eval '(pushnew (truename ".") ql:*local-project-directories* )' \
--eval '(pushnew (truename ".") asdf:*central-registry* )' \
--eval '(ql:register-local-projects)' \
--eval '(ql:quickload :rlgl-server)' \
--eval "(asdf:oos 'asdf:load-op :rlgl-server :force t)" \
Expand All @@ -66,8 +66,8 @@ cover: clean
coveralls: clean
COVERALLS=true sbcl --disable-debugger \
--eval '(ql:quickload :cl-coveralls)' \
--eval '(pushnew (truename ".") ql:*local-project-directories* )' \
--eval '(pushnew (truename "./test/") ql:*local-project-directories* )' \
--eval '(pushnew (truename ".") asdf:*central-registry* )' \
--eval '(pushnew (truename "./test/") asdf:*central-registry*)' \
--eval '(ql:register-local-projects)' \
--eval '(ql:quickload :test-rlgl-server)' \
--eval '(coveralls:with-coveralls (:project-dir (directory-namestring (truename "."))) (test-rlgl-server:run))' \
Expand Down
22 changes: 11 additions & 11 deletions rlgl-server.asd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Base: 10 -*-
;;;
;;; Copyright (C) 2018-2022 Anthony Green <green@moxielogic.com>
;;; Copyright (C) 2018-2022, 2024 Anthony Green <green@moxielogic.com>
;;;
;;; This program is free software: you can redistribute it and/or
;;; modify it under the terms of the GNU Affero General Public License
Expand Down Expand Up @@ -31,14 +31,14 @@
:depends-on (:rlgl-parsers :rlgl-util :rlgl-db :rlgl-user
:metabang-bind :markup :cl-template
:cl-toml :snooze :cl-json :plump :lquery :ironclad
:inferior-shell :hunchentoot :spinneret
:cl-json-util :cl-fad :str :log4cl :cl-ppcre
:inferior-shell :hunchentoot :spinneret
:cl-json-util :cl-fad :str :log4cl :cl-ppcre
:cxml :cl-dbi :cl-date-time-parser :quri
:local-time :cl-csv :prometheus :cl-postgres
:dbd-sqlite3 :dbd-postgres :zs3 :simple-date-time
:drakma :uuid :cl-base32
:split-sequence :thread-pool
:prometheus.formats.text
:prometheus.exposers.hunchentoot
:prometheus.collectors.sbcl
:prometheus.collectors.process))
:local-time :cl-csv :prometheus :cl-postgres
:dbd-sqlite3 :dbd-postgres :zs3 :simple-date-time
:drakma :uuid :cl-base32 :legit
:split-sequence :thread-pool
:prometheus.formats.text
:prometheus.exposers.hunchentoot
:prometheus.collectors.sbcl
:prometheus.collectors.process))
20 changes: 4 additions & 16 deletions rlgl-server.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,11 @@
(in-package :rlgl-server)

;; ----------------------------------------------------------------------------
;; Get the version number at compile time. This comes from
;; RLGL_VERSION (set on the linux container build commandline), or
;; from git at compile-time. Use UNKNOWN if all else fails.
;; Always pull the version from git

;; This can come from build time...
(eval-when (:compile-toplevel :execute :load-toplevel)
(defparameter +rlgl-git-version+
(inferior-shell:run/ss
"(test -d .git && git describe --tags --dirty=+) || echo UNKNOWN")))

;; But this must come from runtime...
(defparameter +rlgl-version+
(let ((v +rlgl-git-version+))
(if (equal v "UNKNOWN")
(or (uiop:getenv "RLGL_VERSION") v)
v)))
(string-trim '(#\Newline) (with-output-to-string (legit:*git-output*)
(legit:git-describe :tags t :dirty t))))

(defun rlgl-root ()
(fad:pathname-as-directory
Expand Down Expand Up @@ -370,8 +359,7 @@ recognize it, return a RLGL-SERVER:PARSER object, NIL otherwise."
<footer class="page-footer font-small
special-color-dark pt-4">
<div class="footer-copyright
text-center py-3">Version ,(progn +rlgl-version+) // (C) 2018-2024<a href="https://linkedin.com/in/green" >Anthony
Green</a></div>
text-center py-3">Version ,(progn +rlgl-version+) // (C) 2018-2024<a href="https://linkedin.com/in/green" > Anthony Green</a></div>
</footer>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
Expand Down
3 changes: 3 additions & 0 deletions systems.csv
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,6 @@ collectors, ghcr.io/ocicl/collectors@sha256:63c376d694da5341afd15f276caac5a24d80
symbol-munger, ghcr.io/ocicl/symbol-munger@sha256:d73a086e1c00edd7acc8b1c914fd96f0e811421d39a33961670f1f12bc3b3aa7, symbol-munger-20230519-e96558e/symbol-munger.asd
salza2, ghcr.io/ocicl/salza2@sha256:77e9d1cb385ee3ef16c28d495278d77b86b129a4dcceaa38f186e1bf076a5032, salza2-2.1/salza2.asd
iterate, ghcr.io/ocicl/iterate@sha256:fe08e8b697f27807fbfe216e5953cd0b2c6bcdea947815e4494b44af3d6534d4, iterate-20230518-4a64b68/iterate.asd
legit, ghcr.io/ocicl/legit@sha256:2b4d26441a608555baf54636afb3b1344e7ddc2c40cd74b44eeb74a9c42dd9be, legit-20231004-9c677b9/legit.asd
simple-inferiors, ghcr.io/ocicl/simple-inferiors@sha256:46e6110b6efdfd06a955e86ae0f7daa2ea65725fd680a534358bdbc88a813a0c, simple-inferiors-20230808-056ee77/simple-inferiors.asd
lambda-fiddle, ghcr.io/ocicl/lambda-fiddle@sha256:8138cbabd4ab3010f5c082719559aad66035c1a962b82d9e6e239aab54beeacd, lambda-fiddle-20230808-d019c7f/lambda-fiddle.asd

0 comments on commit c456c18

Please sign in to comment.