mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-10 00:07:00 +02:00
Allow building pgloader even when the git command fails, fix #125.
This commit is contained in:
parent
5ce92492ce
commit
5ab0831d4e
@ -47,12 +47,17 @@
|
||||
|
||||
(defun git-hash ()
|
||||
"Return the current abbreviated git hash of the development tree."
|
||||
(let ((git-hash `("git" "--no-pager" "log" "-n1" "--format=format:%h")))
|
||||
(uiop:with-current-directory ((asdf:system-source-directory :pgloader))
|
||||
(multiple-value-bind (stdout stderr code)
|
||||
(uiop:run-program git-hash :output :string)
|
||||
(declare (ignore code stderr))
|
||||
stdout))))
|
||||
(handler-case
|
||||
(let ((git-hash `("git" "--no-pager" "log" "-n1" "--format=format:%h")))
|
||||
(uiop:with-current-directory ((asdf:system-source-directory :pgloader))
|
||||
(multiple-value-bind (stdout stderr code)
|
||||
(uiop:run-program git-hash :output :string)
|
||||
(declare (ignore code stderr))
|
||||
stdout)))
|
||||
(condition (e)
|
||||
;; in case anything happen, just return X.Y.Z~devel
|
||||
(declare (ignore e))
|
||||
(format nil "~a~~devel" *minor-version*))))
|
||||
|
||||
(defparameter *version-string*
|
||||
(concatenate 'string *major-version* "."
|
||||
|
Loading…
Reference in New Issue
Block a user