From a4944dd6b21e69b9ba96a33f71b580d5f674e4f0 Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Sun, 12 May 2024 21:24:36 +0300 Subject: [PATCH] some fixes --- .github/scripts/chart-docs.sh | 1 + .github/scripts/frontmatter.sh | 12 ++---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/scripts/chart-docs.sh b/.github/scripts/chart-docs.sh index 430bdb2bc78..05f839d1417 100755 --- a/.github/scripts/chart-docs.sh +++ b/.github/scripts/chart-docs.sh @@ -178,6 +178,7 @@ main() { echo "copying docs to website for ${chart}" + make_sure_structure_is_there "$train" "$chart" keep_safe_docs "$train" "$chart" remove_old_docs "$train" "$chart" copy_new_docs "$train" "$chart" diff --git a/.github/scripts/frontmatter.sh b/.github/scripts/frontmatter.sh index 001c9f2199a..776fae84012 100755 --- a/.github/scripts/frontmatter.sh +++ b/.github/scripts/frontmatter.sh @@ -20,14 +20,6 @@ is_true() { return 1 } -update_property() { - local property=$1 - local value=$2 - local file_path=$3 - - $base_cmd -i ".$property = $value" "$file_path" -} - echo "Checking front matter" if ! grep -q "^---$" "$file_path"; then echo "Front matter (start) not found, adding it" @@ -41,13 +33,13 @@ echo "Checking title" title=$($base_cmd '.title' "$file_path") # Check if the title is empty if is_empty "$title"; then - update_property "title" "Changelog" "$file_path" + $base_cmd -i '.title="Changelog"' "$file_path" fi echo "Checking pagefind" pagefind=$($base_cmd '.pagefind' "$file_path") if is_empty "$pagefind" || is_true "$pagefind"; then - update_property "pagefind" "false" "$file_path" + $base_cmd -i '.pagefind=false' "$file_path" fi frontmatter=$($base_cmd '.' "$file_path")