sync docs workflow optimization

pull/2567/head
René Werner 2023-08-07 16:03:12 +02:00
parent e4839eaeba
commit e6a9380880
1 changed files with 5 additions and 2 deletions

View File

@ -36,12 +36,15 @@ 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 'sort | reverse' ${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
fi
# Run docusaurus versioning command
$DOCUSAURUS_COMMAND "${new_version}"
if [[ -f $VERSION_FILE ]]; then
jq 'sort | reverse' ${VERSION_FILE} > temp.json && mv temp.json ${VERSION_FILE}
fi
fi
# Push changes