Update sync_docs.sh

optimize docs sync
- sort version json
This commit is contained in:
RW
2023-08-07 15:51:53 +02:00
committed by GitHub
parent 43daa3c38f
commit f38613bb8d

View File

@@ -45,7 +45,7 @@ elif [ "$EVENT" == "release" ]; then
# Check if contrib_versions.json exists and modify it if required # Check if contrib_versions.json exists and modify it if required
if [[ -f $VERSION_FILE ]]; then if [[ -f $VERSION_FILE ]]; then
jq --arg new_version "$new_version" 'del(.[] | select(. == $new_version))' $VERSION_FILE > temp.json && mv temp.json $VERSION_FILE jq --arg new_version "$new_version" 'del(.[] | select(. == $new_version))' $VERSION_FILE > temp.json && mv temp.json $VERSION_FILE
jq -S . ${VERSION_FILE} > temp.json && mv temp.json ${VERSION_FILE} jq 'sort | reverse' ${VERSION_FILE} > temp.json && mv temp.json ${VERSION_FILE}
fi fi
# Run docusaurus versioning command # Run docusaurus versioning command