chore(scripts): fix more

This commit is contained in:
Stavros kois
2023-12-31 21:07:19 +02:00
parent 51e54f3d88
commit 9037a6a4cd
2 changed files with 6 additions and 7 deletions
+5 -6
View File
@@ -209,13 +209,12 @@ jobs:
echo "Appending SCALE changelog to actual changelog..."
# Append SCALE changelog to actual changelog
# Remove header from changelog
sed -n '/^---$/,/^---$/p' "website/docs/charts/${train}/${chart}/CHANGELOG.md"
# Append app-changelog to changelog
cat "charts/${train}/${chart}/app-changelog.md" | cat - "website/docs/charts/${train}/${chart}/CHANGELOG.md" > temp && mv temp "website/docs/charts/${train}/${chart}/CHANGELOG.md"
if grep -qzoP "\-\-\-\ntitle: Changelog\n\-\-\-\n" "website/docs/charts/${train}/${chart}/CHANGELOG.md"; then
echo "changelog header already exists..."
else
echo "Adding changelog header..."
sed -i '1s/^/---\ntitle: Changelog\n---\n\n/' "website/docs/charts/${train}/${chart}/CHANGELOG.md" || echo "failed to add changelog header..."
fi
echo "Adding changelog header..."
sed -i '1s/^/---\ntitle: Changelog\n---\n\n/' "website/docs/charts/${train}/${chart}/CHANGELOG.md" || echo "failed to add changelog header..."
echo "Creating index.md..."
touch website/docs/charts/${train}/${chart}/index.md