Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 89e73b4

Browse filesBrowse files
committed
Fixing publish_release_post.sh script
1 parent c755a0e commit 89e73b4
Copy full SHA for 89e73b4

1 file changed

+4-19Lines changed: 4 additions & 19 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/scripts/publish_release_post.sh‎

Copy file name to clipboardExpand all lines: .github/scripts/publish_release_post.sh
+4-19Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ POST_TIME=$(echo "${RELEASE_DATE}" | sed 's/T/ /' | sed 's/Z/ +0000/')
2020
POST_FILENAME="${POST_DATE}-version${VERSION}-released.md"
2121
POST_TITLE="utPLSQL ${RELEASE_TAG} released"
2222
POST_NAV_TITLE="utPLSQL ${VERSION} released"
23+
POST_PATH='docs/announcements/posts'
2324

2425
mkdir -p github_io
2526
cd github_io
@@ -37,7 +38,7 @@ FORMATTED_BODY=$(echo "${RELEASE_BODY}" \
3738
| sed -E 's@\*\*Full Changelog\*\*: (https://[^ ]+/compare/([^ ]+))@\*\*Full Changelog\*\*: [\2](\1)@g')
3839

3940
# Create the post file
40-
cat > "docs/announcements/posts/${POST_FILENAME}" <<POSTEOF
41+
cat > "${POST_PATH}/${POST_FILENAME}" <<POSTEOF
4142
---
4243
layout: post
4344
title: "${POST_TITLE}"
@@ -51,24 +52,8 @@ ${FORMATTED_BODY}
5152
[Download utPLSQL release ${RELEASE_TAG} here](https://github.com/utPLSQL/utPLSQL/releases/tag/${RELEASE_TAG})
5253
POSTEOF
5354

54-
# Prepend new entry to the top of docs/index.md
55-
INDEX_ENTRY="----------------------------------------------------------------------
56-
57-
^${POST_DATE}^
58-
59-
[${POST_TITLE}](_posts/${POST_FILENAME})
60-
61-
----------------------------------------------------------------------
62-
63-
"
64-
printf '%s' "${INDEX_ENTRY}" | cat - docs/index.md > /tmp/index_new.md
65-
mv /tmp/index_new.md docs/index.md
66-
67-
# Insert new post into mkdocs.yml nav immediately after "- index.md"
68-
sed -i "s| - index.md| - index.md\n - ${POST_NAV_TITLE}: _posts/${POST_FILENAME}|" mkdocs.yml
69-
70-
git add "docs/_posts/${POST_FILENAME}" docs/index.md mkdocs.yml
55+
git add "${POST_PATH}/${POST_FILENAME}" docs/index.md mkdocs.yml
7156
git commit -m "Release announcement for ${RELEASE_TAG}"
7257
git push origin "${GITHUB_IO_BRANCH}"
7358

74-
echo "Release post published: docs/_posts/${POST_FILENAME}"
59+
echo "Release post published: ${POST_PATH}/${POST_FILENAME}"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.