From 8f4de5585ddb57331056ead793548cf22a9f685b Mon Sep 17 00:00:00 2001 From: St33v Date: Fri, 30 Jan 2026 16:58:59 +1100 Subject: fix sotd release slug --- forge/script/sotd-build.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/forge/script/sotd-build.sh b/forge/script/sotd-build.sh index ad23cad..78d6a55 100755 --- a/forge/script/sotd-build.sh +++ b/forge/script/sotd-build.sh @@ -23,13 +23,25 @@ template_file="$TPL/release.template" # --- derive variables ----------------------------------------------------- +slugify() { + echo "$1" \ + | tr '[:upper:]' '[:lower:]' \ + | sed -E ' + s/[^a-z0-9]+/-/g; + s/^-+//; + s/-+$// + ' +} + +#--------------------------------------------------------------------------- +title="$(cat "$TPL/title")" date_today="$(date -I)" -slug="sotd-$date_today" +slug_title="$(slugify "$title")" +slug="$date_today-$slug_title" release_dir="$OUT/$slug" mkdir -p "$release_dir" -title="$(cat "$TPL/title")" cover_desc="Cover image for the song: $title" has_lyrics=false -- cgit v1.3