diff --git a/version.lisp.in b/version.lisp.in index 205c784..6055a6a 100644 --- a/version.lisp.in +++ b/version.lisp.in @@ -29,11 +29,14 @@ (defparameter *version* #.(concatenate 'string - (if (probe-file ".git") - (string-trim '(#\Newline) (run-shell-command "git describe" t)) + (if (probe-file (merge-pathnames ".git/" + (make-pathname :directory (pathname-directory *load-pathname*)))) + (string-trim '(#\Newline) (run-shell-command + (format nil "cd `dirname '~A'` && git describe" + (namestring *load-pathname*)) t)) "@PACKAGE_VERSION@") " Compiled On " - (format-expand *time-format-string-alist* + (format-expand *time-format-string-alist* *time-format-string-default*))) (defcommand version () ()