org: replace version references with org-babel blocks

This way we have fewer lines to edit multiple when making releases.

* doc/org/index.org, doc/org/init.el.in, doc/org/install.org,
doc/org/setup.org, doc/org/tools.org: Use org-babel instead of macros
for release version and links.
This commit is contained in:
Alexandre Duret-Lutz 2023-04-18 17:35:05 +02:00
parent eb80f5d5af
commit 184aa9931e
5 changed files with 23 additions and 11 deletions

View file

@ -1,11 +1,23 @@
#+OPTIONS: H:2 num:nil toc:t html-postamble:nil ^:nil
#+EMAIL: spot@lrde.epita.fr
#+HTML_LINK_HOME: index.html
#+MACRO: SPOTVERSION 2.11.4
#+MACRO: LASTRELEASE 2.11.4
#+MACRO: LASTTARBALL [[http://www.lrde.epita.fr/dload/spot/spot-2.11.3.tar.gz][=spot-2.11.4.tar.gz=]]
#+MACRO: LASTNEWS [[https://gitlab.lre.epita.fr/spot/spot/blob/spot-2-11-3/NEWS][summary of the changes]]
#+MACRO: LASTDATE 2023-02-10
#+NAME: SPOT_VERSION
#+BEGIN_SRC python :exports none :results value :wrap org
return "2.11.4"
#+END_SRC
#+NAME: TARBALL_LINK
#+BEGIN_SRC python :exports none :var version=SPOT_VERSION :results output :wrap org
print(f"[[http://www.lrde.epita.fr/dload/spot/spot-{version}.tar.gz][=spot-{version}.tar.gz=]]")
#+END_SRC
#+NAME: NEWS_LINK
#+BEGIN_SRC python :exports none :var version=SPOT_VERSION :results output :wrap org
version = version.replace('.', '-')
print(f"[[https://gitlab.lre.epita.fr/spot/spot/blob/spot-{version}/NEWS][summary of the changes]]")
#+END_SRC
#+ATTR_HTML: :id spotlogo
[[file:spot2.svg]]