archive-font-patcher: Write commit hash instead of tags in readme

[why]
In the CI we have only a shallow clone of the repo, so access to tags is
not possible. Instead of resulting in a nice message like '2.3.3-35' we
get an empty string.

[how]
As we have no tags we can only write the commit hash and other
information given in the only existing (i.e. last) commit:
date, author, title

It's a bit more cumbersome but one can still see from which point in the
repo the archive has been created.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2023-02-17 11:44:13 +01:00
parent 55b6e087c9
commit afa6abe0d9

View file

@ -19,8 +19,8 @@ mini_readme="$outputdir/readme.md"
cat "$parent_dir/src/archive-font-patcher-readme.md" >> "$mini_readme"
if [ $# -ge 1 ]; then
echo "Intemediate version, adding git version"
echo -e "\n## Version\n" >> "$mini_readme"
echo "This archive is created from $(git describe --tags --dirty)" >> "$mini_readme"
echo -e "\n## Version\nThis archive is created from\n" >> "$mini_readme"
git log --pretty=medium --no-decorate --no-abbrev -n 1 HEAD | sed 's/^/ /' >> "$mini_readme"
fi
# clear out the directory zips