Update sync_docs.sh

optimize sync docs
- sort version json
pull/2567/head
RW 2023-08-07 15:51:16 +02:00 committed by GitHub
parent 1e4e0c3b76
commit e4839eaeba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ elif [ "$EVENT" == "release" ]; then
# Check if contrib_versions.json exists and modify it if required
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 -S . ${VERSION_FILE} >temp.json && mv temp.json ${VERSION_FILE}
jq 'sort | reverse' ${VERSION_FILE} >temp.json && mv temp.json ${VERSION_FILE}
fi
# Run docusaurus versioning command