mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-17 06:08:27 +01:00
contrib: add somehow working emacs script to help prepare new release
This commit is contained in:
parent
0f1ec4a879
commit
0e17282f60
64
contrib/prepare_release/helper.el
Normal file
64
contrib/prepare_release/helper.el
Normal file
@ -0,0 +1,64 @@
|
||||
;; how to use this helper?
|
||||
;; 1. run "git log --reverse 2021-04-25..master > tmp.md" (2021-04-25 is example tag of previous version)
|
||||
;; 2. copy contents of template.md to the start of tmp.md
|
||||
;; 3. in emacs M-x load-file then choose helper.el
|
||||
|
||||
(defun rssbridge-log--get-commit-block()
|
||||
(interactive)
|
||||
(search-backward "commit ") ;; (move-beginning-of-line 1)
|
||||
(set-mark-command nil)
|
||||
(right-char)
|
||||
(search-forward "commit ") ;; (move-end-of-line 1)
|
||||
)
|
||||
|
||||
(defun rssbridge-log--remove-until-commit-block-start()
|
||||
(interactive)
|
||||
(move-beginning-of-line 1)
|
||||
(set-mark-command nil)
|
||||
(search-backward "commit ")
|
||||
(delete-region (region-beginning) (region-end))
|
||||
)
|
||||
|
||||
(defun rssbridge-log--cut-paste(arg)
|
||||
(interactive)
|
||||
(kill-whole-line 0)
|
||||
(goto-line 0)
|
||||
(search-forward arg)
|
||||
(move-end-of-line 1)
|
||||
(newline)
|
||||
(yank)
|
||||
(set-mark-command 1)
|
||||
(search-forward "commit ")
|
||||
)
|
||||
|
||||
(defun rssbridge-log-copy-as-new()
|
||||
(interactive)
|
||||
(rssbridge-log--get-commit-block)
|
||||
(replace-regexp ".*\\[\\(.*\\)\\].*\\((.*)\\)" "* \\1 () \\2" nil (region-beginning) (region-end))
|
||||
(rssbridge-log--remove-until-commit-block-start)
|
||||
(rssbridge-log--cut-paste "## New bridges")
|
||||
)
|
||||
|
||||
(defun rssbridge-log-copy-as-mod()
|
||||
(interactive)
|
||||
(rssbridge-log--get-commit-block)
|
||||
(replace-regexp ".*\\[\\(.*\\)\\]" "* \\1:" nil (region-beginning) (region-end))
|
||||
(rssbridge-log--remove-until-commit-block-start)
|
||||
(rssbridge-log--cut-paste "## Modified bridges")
|
||||
)
|
||||
|
||||
(defun rssbridge-log-remove()
|
||||
(interactive)
|
||||
(rssbridge-log--get-commit-block)
|
||||
(rssbridge-log--remove-until-commit-block-start)
|
||||
(set-mark-command 1)
|
||||
(search-forward "commit ")
|
||||
)
|
||||
|
||||
(defun rssbridge-log-copy-as-gen()
|
||||
(interactive)
|
||||
(rssbridge-log--get-commit-block)
|
||||
(replace-regexp ".*\\[\\(.*\\)\\]" "* \\1:" nil (region-beginning) (region-end))
|
||||
(rssbridge-log--remove-until-commit-block-start)
|
||||
(rssbridge-log--cut-paste "## General")
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user