diff options
author | Teddy Wing | 2022-05-22 01:58:15 +0200 |
---|---|---|
committer | Teddy Wing | 2022-05-22 01:58:15 +0200 |
commit | 3b335bb401524a6a1a95270a2b15ad2c46842568 (patch) | |
tree | dab0a22d0537724691ab4db00da37501bcd0c1b2 | |
parent | 64ba87978546e783e7055b52cb4125e9bfec25d3 (diff) | |
download | wajir-3b335bb401524a6a1a95270a2b15ad2c46842568.tar.bz2 |
option.lisp: Move program version to macro
When I tried building with Homebrew, I got this error:
$ wajir --version
error: Failed to find the WRITE-DATE of
/private/tmp/wajir-20220522-65276-i3kj2/bundle/local-projects/:
No such file or directory
Try and pre-compile the program version to counter this error.
-rw-r--r-- | src/option.lisp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/option.lisp b/src/option.lisp index 466a229..fdb0a33 100644 --- a/src/option.lisp +++ b/src/option.lisp @@ -78,6 +78,10 @@ with code `exit-code`." `condition` and exits with EX_USAGE." (exit-with-error condition sysexits:+usage+)) +(defmacro program-version () + "Program version string" + (asdf:component-version (asdf:find-system :wajir))) + (defun parse-options () "Parse command line options." (multiple-value-bind (options free-args) @@ -99,7 +103,7 @@ with code `exit-code`." ;; Version (when-option (options :version) - (format t "~a~%" (asdf:component-version (asdf:find-system :wajir))) + (format t "~a~%" (program-version)) (opts:exit sysexits:+ok+)) |