* Reviewing changes to add to =CHANGELOG.org= Examine the output of =git log= since the last time the Change Log was updated and narrow it down to notable commits, e.g. new variables, bug fixes, breaking changes, etc. Write a few sentences describing the change and how it affects users going forward. #+NAME: changelog #+HEADER: :var PREV_VERSION="v0.8.2" VERSION="master" #+BEGIN_SRC shell :results output git log --pretty=format:"%s" ${PREV_VERSION}...${VERSION} #+END_SRC #+RESULTS: changelog * Updating project metadata - Increment copyright years, if needed - Set the Version header - Set =jupyter-version= in file:jupyter-base.el #+CALL: update-project-metadata(version="0.8.2") #+NAME: source-files #+begin_src shell git ls-files | grep -E '.el$' #+end_src #+NAME: eval-in-file #+begin_src elisp (lambda (file fun) (let* ((buf (find-buffer-visiting file)) (kill (null buf))) (unless buf (setq buf (find-file-noselect file))) (with-current-buffer buf (save-excursion (save-restriction (widen) (goto-char (point-min)) (funcall fun) (save-buffer) (when kill (kill-buffer))))))) #+end_src #+NAME: update-project-metadata #+HEADERS: :var version="0.8.2" #+begin_src elisp :results silent :var files=source-files eval-in-file=eval-in-file (let ((lexical-binding t) (copyright-re "^;; Copyright (C) \\([0-9]+\\)\\(?:-\\([0-9]+\\)\\)?") (version-re "^;; Version: \\(\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\)") (this-year (string-to-number (format-time-string "%Y")))) (dolist (file files) (funcall eval-in-file (car file) (lambda () (when (re-search-forward copyright-re nil t) (let* ((end-group (if (match-string 2) 2 1)) (new-span (= end-group 1)) (year (string-to-number (match-string end-group))) (new-year (and (<= (1+ year) this-year) (number-to-string (1+ year))))) (when new-year (if (not new-span) (replace-match new-year nil nil nil end-group) (goto-char (match-end end-group)) (insert "-" new-year))))) (when (re-search-forward version-re nil t) (replace-match version nil nil nil 1))))) (funcall eval-in-file "jupyter-base.el" (lambda () (when (re-search-forward "^(defconst jupyter-version \"\\(.+\\)\"") (replace-match version nil nil nil 1))))) #+end_src * TODO Makefile =release= target - Updates project metadata - Creates tagged (and signed) commit