Add small tool to create release artefact table

Usage is a bit ... hard, because we need to do this before the release
is published.

Download the complete artifact zip archive from the release-drafting
run.

Unpack it into the repository (will end up in patched-fonts/)

Pack all archives with archive-fonts.sh

Then use this tool to extract the names and sizes of the artifacts.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2023-11-21 14:18:26 +01:00
parent 4b0b2d9822
commit 9bbe31d61b
2 changed files with 32 additions and 0 deletions

View file

@ -16,6 +16,7 @@ Note: Usually you need to call the scripts in this directory while actually bein
* `generate-font-image-previews.sh`: Generates the preview images for `nerdfonts.com` (i.e. gh-pages) [3]
* `generate-glyph-info-from-set.py`: Generate the `i_xxx.sh` file from a glyph source (font) file, if the glyphs are named correctly [4]
* `generate-original-source.py`: Generate `original-source.otf` from single glyph svgs. [5]
* `generate-release-summary.sh`: Helper to generate the release table with zip and xz [3]
* `generate-sample-set.sh`: Generate one patched font file from each source font (for manual checks) [4]
* `generate-webfonts.sh`: Generate woff and woff2 font files from the SymbolsOnly font (for the gh-pages) [1]
* `get-font-names-from-json.sh`: Helper to setup the CI font matrix from `data/fonts.json` [1]

View file

@ -0,0 +1,31 @@
#!/usr/bin/env bash
sd="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." >/dev/null 2>&1 || exit && pwd -P)"
archivedir=${sd}/../../archives
url=https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.0/
all=$(find "${archivedir}" -name '*.zip' | sed 's/\.zip$//;s/.*\///' | sort)
echo "## Release archives"
echo "You can select between \`zip\` or \`tar.xz\`. The later are far smaller (about 1/10). Please leave feedback in #1233 if you use the \`xz\` version."
echo
echo "[FontPatcher here](${url}FontPatcher.zip) only as \`zip\`."
echo
echo "Because the artifacts list is now even longer, here listed next to each other (open details, sizes are approximate):"
echo
echo "<details>"
echo
echo "| Font | | |"
echo "|------|---|---|"
for font in $all; do
# shellcheck disable=SC2012 # The human readable size is all we want
zsize=$(LC_ALL=C ls -hs "${archivedir}/${font}.zip" | sed 's/ .*//')
# shellcheck disable=SC2012 # The human readable size is all we want
xsize=$(LC_ALL=C ls -hs "${archivedir}/${font}.tar.xz" | sed 's/ .*//')
echo "| ${font} | [Zip archive (${zsize})](${url}${font}.zip) | [XZ archive (${xsize})](${url}${font}.tar.xz) |"
done
echo
echo "</details>"