Commit 3a243490 authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Generate the NEWS file

parent 3fcc585c
Pipeline #174484 passed with stages
in 52 minutes and 5 seconds
......@@ -20,6 +20,7 @@
/INSTALL
/Makefile
/Makefile.in
/NEWS
/README
/README.md
/aclocal.m4
......
Waiting for the release...
\ No newline at end of file
......@@ -18,7 +18,7 @@
(echo "@setfilename tarot.info" \
&& echo '\bye') > doc/tarot.texi || exit 1
touch AUTHORS || exit 1
touch README || exit 1
touch README NEWS || exit 1
export PATH="$PWD/.gnulib:$PATH"
if [ -d .gnulib ]
then
......@@ -28,8 +28,8 @@ gnulib-tool --libtool \
--import assert git-version-gen getopt-gnu setenv stdalign xalloc setlocale \
gitlog-to-changelog git-version-gen || exit 1
./gitlog-to-changelog > ChangeLog
touch README || exit 1
touch README NEWS || exit 1
autoreconf -vif || exit 1
rm doc/tarot.texi || exit 1
rm AUTHORS || exit 1
rm README || exit 1
rm README NEWS || exit 1
#!/bin/sh
# tarot implements the rules of the tarot game
# Copyright (C) 2019 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
echo "#+title: What's new in tarot $(cat .version)" > NEWS.org
echo "#+author: Vivien Kraus" >> NEWS.org
echo "#+email: vivien@planete-kraus.eu" >> NEWS.org
echo "#+options: toc:nil" >> NEWS.org
for tag in $(git tag --sort=taggerdate | grep '^v[0-9]*\.[0-9]*\.[0-9]*/[0-9]*\.[0-9]*\.[0-9]*$' | tac)
do
TAG_FILENAME=$(echo "$tag" | sed 's/\//_/g')
TAG_CHARS=$(echo "$tag" | wc -c)
TAG_HEADER=$(git tag -l -n $tag | tail -c +$TAG_CHARS | sed 's/\.[[:space:]]$//g')
TAG_DATE=$(git log -1 --format=%ai $tag)
TAG_DATE_DEB=$(LANG=C date --date="$TAG_DATE" "+%a, %d %b %Y %T %z")
TAG_AUTHOR=$(git log -1 --format=%an $tag)
TAG_EMAIL=$(git log -1 --format=%ae $tag)
TAG_VERSION_FULL=$(echo "$tag" | tail -c +2)
TAG_PROGRAM_VERSION=$(echo "$TAG_VERSION_FULL" | cut -d '/' -f 1)
TAG_LIBTOOL_VERSION=$(echo "$TAG_VERSION_FULL" | cut -d '/' -f 2)
echo "* Version $TAG_VERSION_FULL: $(echo "$TAG_HEADER" | sed 's/^ *//g') <$TAG_DATE>" >> NEWS.org
git tag -l -n999 $tag | tail -n +2 | sed 's/^\*/**/g' >> NEWS.org
done
LANG=C emacs --batch --file NEWS.org --load "setup.el" --eval "(org-ascii-export-to-ascii)" || exit 1
cat NEWS.txt || exit 1
rm -f NEWS.org NEWS.txt
......@@ -16,8 +16,11 @@
EXTRA_DIST += releases.xml
MAINTAINERCLEANFILES += $(srcdir)/releases.xml
dist_noinst_SCRIPTS += gen-releases
dist_noinst_SCRIPTS += gen-releases gen-news
$(srcdir)/releases.xml:
$(AM_V_GEN) (cd $(top_srcdir) ; ./gen-releases) | $(XMLLINT) --format - > $@-t
@mv $@-t $@
$(srcdir)/NEWS: gen-news .version
$(AM_V_GEN) (cd $(top_srcdir) ; ./gen-news) > NEWS
......@@ -16,3 +16,4 @@
(require 'ox-md)
(setq org-confirm-babel-evaluate nil)
(setq org-ascii-charset 'utf-8)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment