Skip to content

Commit

Permalink
sync docs workflow optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneWerner87 committed Aug 7, 2023
1 parent e4839ea commit e6a9380
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/scripts/sync_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e6a9380

Please sign in to comment.