diff options
| -rw-r--r-- | Makefile | 34 |
1 files changed, 32 insertions, 2 deletions
@@ -5,7 +5,7 @@ include default.mk install install-lisp install-docs install-info \ test test-interactive magit \ clean clean-lisp clean-docs clean-archives \ - genstats \ + genstats melpa-pre-release melpa-post-release \ dist magit-$(VERSION).tar.gz elpa $(ELPA_ARCHIVES) all: lisp docs @@ -45,7 +45,9 @@ help: $(info make authors - regenerate AUTHORS.md) $(info make dist - create tarballs) $(info make elpa - create elpa tarballs) - $(info make marmalade - upload elpa tarballs to marmalade) + $(info make VERSION=... melpa-pre-release) + $(info make VERSION=... melpa-post-release) + $(info - - fixup version strings) @printf "\n" lisp: @@ -220,3 +222,31 @@ magit-$(VERSION).tar: lisp info @$(CP) $(ELPA_DOCS_FILES) magit-$(VERSION) @$(TAR) c --mtime=./magit-$(VERSION) -f magit-$(VERSION).tar magit-$(VERSION) @$(RMDIR) magit-$(VERSION) + +define set_package_requires +(require 'dash) +(dolist (lib (list "with-editor" "git-commit" "magit-popup" "magit")) + (with-current-buffer (find-file-noselect (format "lisp/%s.el" lib)) + (goto-char (point-min)) + (re-search-forward "^;; Package-Requires: ") + (let ((s (read (buffer-substring (point) (line-end-position))))) + (--when-let (assq 'async s) (setcdr it (list async-version))) + (--when-let (assq 'with-editor s) (setcdr it (list "$(VERSION)"))) + (--when-let (assq 'git-commit s) (setcdr it (list "$(VERSION)"))) + (--when-let (assq 'magit-popup s) (setcdr it (list "$(VERSION)"))) + (delete-region (point) (line-end-position)) + (insert (format "%S" s)) + (save-buffer)))) +endef +# ' +export set_package_requires + +melpa-pre-release: + @$(BATCH) --eval "(progn\ + (setq async-version \"$(ASYNC_VERSION)\")\ + $$set_package_requires)" + +melpa-post-release: + @$(BATCH) --eval "(progn\ + (setq async-version \"20150812\")\ + $$set_package_requires)" |
