Skip to content

Commit 9bbe31d

Browse files
committed
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>
1 parent 4b0b2d9 commit 9bbe31d

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

bin/scripts/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Note: Usually you need to call the scripts in this directory while actually bein
1616
* `generate-font-image-previews.sh`: Generates the preview images for `nerdfonts.com` (i.e. gh-pages) [3]
1717
* `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]
1818
* `generate-original-source.py`: Generate `original-source.otf` from single glyph svgs. [5]
19+
* `generate-release-summary.sh`: Helper to generate the release table with zip and xz [3]
1920
* `generate-sample-set.sh`: Generate one patched font file from each source font (for manual checks) [4]
2021
* `generate-webfonts.sh`: Generate woff and woff2 font files from the SymbolsOnly font (for the gh-pages) [1]
2122
* `get-font-names-from-json.sh`: Helper to setup the CI font matrix from `data/fonts.json` [1]
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
3+
sd="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." >/dev/null 2>&1 || exit && pwd -P)"
4+
archivedir=${sd}/../../archives
5+
url=https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.0/
6+
7+
all=$(find "${archivedir}" -name '*.zip' | sed 's/\.zip$//;s/.*\///' | sort)
8+
9+
echo "## Release archives"
10+
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."
11+
echo
12+
echo "[FontPatcher here](${url}FontPatcher.zip) only as \`zip\`."
13+
echo
14+
echo "Because the artifacts list is now even longer, here listed next to each other (open details, sizes are approximate):"
15+
echo
16+
echo "<details>"
17+
echo
18+
echo "| Font | | |"
19+
echo "|------|---|---|"
20+
21+
22+
for font in $all; do
23+
# shellcheck disable=SC2012 # The human readable size is all we want
24+
zsize=$(LC_ALL=C ls -hs "${archivedir}/${font}.zip" | sed 's/ .*//')
25+
# shellcheck disable=SC2012 # The human readable size is all we want
26+
xsize=$(LC_ALL=C ls -hs "${archivedir}/${font}.tar.xz" | sed 's/ .*//')
27+
echo "| ${font} | [Zip archive (${zsize})](${url}${font}.zip) | [XZ archive (${xsize})](${url}${font}.tar.xz) |"
28+
done
29+
30+
echo
31+
echo "</details>"

0 commit comments

Comments
 (0)