src/: Export a package version from the ASDF system definition.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 19 Aug 2015 01:11:52 +0000 (02:11 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 19 Aug 2015 01:11:52 +0000 (02:11 +0100)
I'd like to arrange the version automatically from `config/auto-version'
but can't figure out a good way yet.

src/frontend.lisp
src/package.lisp
src/sod.asd

index e7b515a..9ed6f30 100644 (file)
@@ -81,7 +81,7 @@
     ;; Option definitions.
     (define-program
       :help "Process SOD input files to produce (e.g.) C output."
-      :version "0.1.0"
+      :version *sod-version*
       :usage "SOURCES..."
       :options (options
                (help-options :short-version #\V)
index 60da8ea..a6b9785 100644 (file)
        #:sod-utilities
        #:sod-parser))
 
+(cl:in-package #:sod)
+
+(export '*sod-version*)
+(defvar *sod-version* (asdf:component-version (asdf:find-system "sod"))
+  "The version of the SOD translator system, as a string.")
+
 ;;;----- That's all, folks --------------------------------------------------
index c819725..af2cd64 100644 (file)
@@ -34,7 +34,7 @@
 (defsystem sod
 
   ;; Boring copyright stuff.
-  :version "1.0.0"
+  :version "0.1.0"
   :author "Mark Wooding"
   :license "GNU General Public License, version 2 or later"