diff options
author | Achim Gratz <Stromeko@Stromeko.DE> | 2012-05-17 12:53:32 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-05-18 07:45:47 +0200 |
commit | 4ea1573b9deedb4fa9fe4acaffbccc98a8b57964 (patch) | |
tree | 535aab4bd9c83f58a0cc6489737e0bcadc52c064 | |
parent | 58e4e212f269681d89d8f06b75ad48442117b89e (diff) | |
download | org-mode-4ea1573b9deedb4fa9fe4acaffbccc98a8b57964.tar.gz |
Remove "release_" prefix from org-version when org-fixup is run
* UTILITIES/org-fixup.el: Remove "release_" prefix from org-version
when it is established from git.
-rw-r--r-- | UTILITIES/org-fixup.el | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/UTILITIES/org-fixup.el b/UTILITIES/org-fixup.el index a7e64b1..bf70a80 100644 --- a/UTILITIES/org-fixup.el +++ b/UTILITIES/org-fixup.el @@ -81,19 +81,14 @@ (unwind-protect (progn (cd dirorg) - (setq org-git-version - (concat (substring - (shell-command-to-string "git describe --abbrev=6 HEAD") - 0 -1) - (when (string-match "\\S-" - (shell-command-to-string - "git status -uno --porcelain")) - ".dirty"))) - (setq org-version - (substring - (shell-command-to-string "git describe --abbrev=0 HEAD") - 0 -1)))) - (cd origin))) + (let (( git6 (substring (shell-command-to-string "git describe --abbrev=6 HEAD") 0 -1)) + ( git0 (substring (shell-command-to-string "git describe --abbrev=0 HEAD") 0 -1)) + ( gitd (string-match "\\S-" (shell-command-to-string "git status -uno --porcelain")))) + (setq org-git-version (concat git6 (when gitd ".dirty"))) + (if (string-match "^release_" git0) + (setq org-version (substring git0 8)) + (setq org-version git0))) + (cd origin))))) `(progn (defun org-release () ,org-version) (defun org-git-version () ,org-git-version) |