mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-11 08:46:59 +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 ()
|
(defun git-hash ()
|
||||||
"Return the current abbreviated git hash of the development tree."
|
"Return the current abbreviated git hash of the development tree."
|
||||||
(let ((git-hash `("git" "--no-pager" "log" "-n1" "--format=format:%h")))
|
(handler-case
|
||||||
(uiop:with-current-directory ((asdf:system-source-directory :pgloader))
|
(let ((git-hash `("git" "--no-pager" "log" "-n1" "--format=format:%h")))
|
||||||
(multiple-value-bind (stdout stderr code)
|
(uiop:with-current-directory ((asdf:system-source-directory :pgloader))
|
||||||
(uiop:run-program git-hash :output :string)
|
(multiple-value-bind (stdout stderr code)
|
||||||
(declare (ignore code stderr))
|
(uiop:run-program git-hash :output :string)
|
||||||
stdout))))
|
(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*
|
(defparameter *version-string*
|
||||||
(concatenate 'string *major-version* "."
|
(concatenate 'string *major-version* "."
|
||||||
|
Loading…
Reference in New Issue
Block a user