mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-29 04:58:53 +08:00
Improve el-get-version to report the current short sha1 from git, and to kill-new the version string.
This commit is contained in:
parent
dac6acc5cd
commit
3164fa3a81
11
el-get.el
11
el-get.el
|
@ -286,7 +286,16 @@ force their evaluation on some packages only."
|
|||
(defun el-get-version ()
|
||||
"Message the current el-get version"
|
||||
(interactive)
|
||||
(message "el-get version %s" el-get-version))
|
||||
(let ((version
|
||||
(if (string= (cadr (split-string el-get-version "\\.")) "0")
|
||||
;; devel version, add the current git sha1 (short form)
|
||||
(let ((default-directory (file-name-directory el-get-script)))
|
||||
(concat el-get-version "."
|
||||
(shell-command-to-string
|
||||
"git --no-pager log -n1 --format=format:%h")))
|
||||
el-get-version)))
|
||||
(kill-new version)
|
||||
(message "el-get version %s" version)))
|
||||
|
||||
(defun el-get-read-all-recipe-names ()
|
||||
"Return the list of all known recipe names.
|
||||
|
|
Loading…
Reference in New Issue
Block a user