summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSt33v <github@f3rr3t.com>2026-01-30 16:58:59 +1100
committerSt33v <github@f3rr3t.com>2026-01-30 16:58:59 +1100
commit8f4de5585ddb57331056ead793548cf22a9f685b (patch)
tree854e763de75b00cf77379fb015e03dcf0c21a444
parent7dc52936d54976fa70194239e4ac7639a5428e72 (diff)
fix sotd release slug
-rwxr-xr-xforge/script/sotd-build.sh16
1 files 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