diff --git a/.github/scripts/release-docs.sh b/.github/scripts/release-docs.sh index 4117c7cf1..ef455f099 100755 --- a/.github/scripts/release-docs.sh +++ b/.github/scripts/release-docs.sh @@ -53,6 +53,12 @@ VERSION_STRING_REPLACEMENT="version = \"${CHANNEL_VERSION}\"" awk -v REPLACEMENT="${VERSION_STRING_REPLACEMENT}" '{gsub(/version = \"edge\"/, REPLACEMENT); print}' docs/config.toml > docs/config.toml.tmp mv docs/config.toml.tmp docs/config.toml +# In docs/config.toml, change version to CHANNEL_VERSION instead of latest or older version +DOC_VERSION_STRING_REPLACEMENT="version = \"${CHANNEL_VERSION}\"" +sed -i.bak -E "s/^( *)[ \t]*version = \"(latest|v.*)\"/\1${DOC_VERSION_STRING_REPLACEMENT}/" docs/config.toml +# Delete the backup file +rm docs/config.toml.bak + # In docs/config.toml, change github_branch to CHANNEL_VERSION instead of edge GITHUB_BRANCH_STRING_REPLACEMENT="github_branch = \"${CHANNEL_VERSION}\"" awk -v REPLACEMENT="${GITHUB_BRANCH_STRING_REPLACEMENT}" '{gsub(/github_branch = \"edge\"/, REPLACEMENT); print}' docs/config.toml > docs/config.toml.tmp diff --git a/config.toml b/config.toml new file mode 100644 index 000000000..e69de29bb diff --git a/docs/config.toml b/docs/config.toml index 615d5b55e..36d1d0e38 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -87,7 +87,7 @@ version_menu = "Releases" url = "https://edge.docs.radapp.io" [[params.versions]] - version = "latest" + version = "v0.31" url = "https://docs.radapp.io" # Markdown Engine - Allow inline html