aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 20 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index acdd527..5ad1723 100644
--- a/Makefile
+++ b/Makefile
@@ -110,6 +110,24 @@ elpa:
# Change the version using make VERSION=x.y.z
version:
- sed -e '/^\s*"[[:digit:]]\+\(\.[[:digit:]]\+\)*"\s*$$/ s/".*"/"${VERSION}"/' evil-pkg.el > evil-pkg.el.new && mv evil-pkg.el.new evil-pkg.el
- sed -e '/^;;\s\+Version:\s*[[:digit:]]\+\(\.[[:digit:]]\+\)*\s*$$/ s/:.*$$/: ${VERSION}/' -i evil*.el
+ $(EMACS) --batch --eval '(setq vc-handled-backends nil)' ${FILES} evil-tests.el -Q \
+--eval "\
+(progn \
+ (find-file \"evil-vars.el\") \
+ (when (re-search-forward \"^(defconst evil-version \\\"\\\\([-_.[:word:]]*\\\\)\\\"\" nil t) \
+ (replace-match \"${VERSION}\" t t nil 1)) \
+ (find-file \"evil-pkg.el\") \
+ (goto-line 3) \
+ (when (and (string-match-p \"[[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+\" \"${VERSION}\") \
+ (re-search-forward \"\\\"\\\\([-_.[:word:]]*\\\\)\\\"\" nil t)) \
+ (replace-match \"${VERSION}\" t t nil 1)) \
+ (dolist (buffer (reverse (buffer-list))) \
+ (when (buffer-file-name buffer) \
+ (set-buffer buffer) \
+ (goto-char (point-min)) \
+ (when (re-search-forward \"^;;[[:space:]]*Version:[[:space:]]*\\\\([-_.[:word:]]*\\\\)\" nil t) \
+ (replace-match \"${VERSION}\" t t nil 1)) \
+ (when (buffer-modified-p) (save-buffer 0))))) \
+"
+