Avoid depending on 'git' to gather the commit id

This commit is contained in:
Juan Jose Garcia Ripoll 2011-05-28 14:24:56 +02:00
parent 57dabb1cfe
commit 4c77c2ca63
2 changed files with 6 additions and 7 deletions

View file

@ -215,6 +215,9 @@ ECL 11.1.2
is done to avoid accidentally generating header files with the same name
as those in the C library. Take for instance, float.lsp -> float.h.
- ECL no longer relies on "git" being installed to gather the git commit id
and setting (ext:lisp-implementation-vcs-id).
;;; Local Variables: ***
;;; mode:text ***
;;; fill-column:79 ***

View file

@ -166,13 +166,9 @@
;;; * Update version number now that SI:SYSTEM is available
;;;
(when (and (not (member :windows *features*))
(probe-file "@top_srcdir@/../.git/"))
(when (probe-file "COMMIT-ID")
(delete-file "COMMIT-ID"))
(when (and (zerop (si::system "(cd \"@top_srcdir@\" && git log --format=oneline -1) > COMMIT-ID"))
(probe-file "COMMIT-ID"))
(let* ((file (open "COMMIT-ID" :direction :input :element-type :default
(let ((commit-id (probe-file "@top_srcdir@/../.git/ORIG_HEAD")))
(when commit-id
(let* ((file (open commit-id :direction :input :element-type :default
:external-format :default))
(line (read-line file))
(l (length line)))