From 13d7ebf1b64f77701e7c77aa3c9247099beb75fd Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 12 Aug 2020 08:30:06 -0300 Subject: Revert "Assert all post refs end with '-post' and TIL refs end with -til" This reverts commit e0db9261ea31c38ea5b6de4246d9f651920443a0. Now instead of having such restriction in name of separate "namespaces" for posts and TILs, I'd rather have more meaninful names for each entry. If this doesn't work on the long run (like being hard coming up with enw names) I can add this restriction again. --- scripts/assert-content.sh | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'scripts') diff --git a/scripts/assert-content.sh b/scripts/assert-content.sh index 0642663..d83ec33 100755 --- a/scripts/assert-content.sh +++ b/scripts/assert-content.sh @@ -59,7 +59,6 @@ assert-frontmatter() { echo Linting posts... >&2 for post in $(jq -r '.posts[] | @base64' "${JSON}"); do assert-frontmatter "$post" - REF="$(get-ref "$post")" DATE="$(get-date "$post" | awk '{print $1}')" URL="$(basename "$(get-url "$post")")" FILE="_posts/${DATE}-${URL%.html}.md" @@ -68,11 +67,6 @@ for post in $(jq -r '.posts[] | @base64' "${JSON}"); do red "date/filename mismatch: '${FILE}' does not exist." exit 1 } - - grep '\-post$' <(echo "${REF}") > /dev/null || { - red "ref '${REF}' doesn't end with '-post'." - exit 1 - } done echo Linting pages... >&2 @@ -91,12 +85,7 @@ done echo Linting tils... >&2 for til in $(jq -r '.tils[] | @base64' "${JSON}"); do - REF="$(get-ref "$til")" assert-frontmatter "$til" - grep '\-til$' <(echo "${REF}") > /dev/null || { - red "ref '${REF}' doesn't end with '-til'." - exit 1 - } done echo Asserting unique refs... >&2 -- cgit v1.2.3