Skip to content
Browse files

Remove version.lisp.in.

 * Canonical version number is now in stumpwm.asd.  Autoconf picks it
   up from there.
 * Maintainer updates version number and commits before creating a
   release.
 * version.lisp looks for a .git dir alongside the source, if found
   then *version* is set using git describe, otherwise the release
   version is used.
  • Loading branch information...
1 parent 486f742 commit b1271a91efe529f774d6c2d4189b9e3e95d61aea @dangerousben committed Nov 20, 2011
Showing with 14 additions and 10 deletions.
  1. +1 −2 configure.ac
  2. +1 −1 stumpwm.asd
  3. +12 −7 version.lisp.in → version.lisp
View
3 configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT(Stump Window Manager, 0.9.8-git, sabetts@gmail.com)
+AC_INIT(Stump Window Manager, esyscmd(grep :version stumpwm.asd | cut -d\" -f2 | tr -d \\n), sabetts@gmail.com)
AC_SUBST(CONTRIB_DIR)
AC_SUBST(LISP_PROGRAM)
@@ -102,4 +102,3 @@ fi
# Checks for library functions.
AC_OUTPUT(Makefile)
AC_OUTPUT(make-image.lisp)
-AC_OUTPUT(version.lisp)
View
2 stumpwm.asd
@@ -14,7 +14,7 @@
(defsystem :stumpwm
:name "StumpWM"
:author "Shawn Betts <sabetts@vcn.bc.ca>"
- :version "CVS"
+ :version "0.9.7"
:maintainer "Shawn Betts <sabetts@vcn.bc.ca>"
;; :license "GNU General Public License"
:description "A tiling, keyboard driven window manager"
View
19 version.lisp.in → version.lisp
@@ -27,13 +27,18 @@
(export '(*version* version))
(defparameter *version*
- #.(concatenate 'string
- (if (probe-path ".git")
- (string-trim '(#\Newline) (run-shell-command "git describe" t))
- "@PACKAGE_VERSION@")
- " Compiled On "
- (format-expand *time-format-string-alist*
- *time-format-string-default*)))
+ #.(concatenate
+ 'string
+ (let* ((sys (asdf:find-system :stumpwm))
+ (git-dir (probe-path (asdf:system-relative-pathname sys ".git"))))
+ (if git-dir
+ (string-trim '(#\Newline)
+ (run-shell-command
+ (format nil "GIT_DIR=~a git describe" git-dir) t))
+ (asdf:component-version sys)))
+ " Compiled On "
+ (format-expand *time-format-string-alist*
+ *time-format-string-default*)))
(defcommand version () ()
"Print version information and compilation date."

0 comments on commit b1271a9

Please sign in to comment.
Something went wrong with that request. Please try again.