Skip to content

Conversation

@allenhouchins
Copy link
Member

This pull request improves the robustness and reliability of the .github/scripts/dogfood-policy-updater-latest-safari.sh script, focusing on more accurate parsing and updating of the Safari policy query, as well as better error handling when fetching data from external sources.

Parsing and Query Update Improvements:

  • Improved extraction of the query section from the YAML response by switching from sed to a more reliable awk approach, ensuring multiline queries are correctly captured.
  • Refactored the logic for updating the query section: now the new query is constructed directly within the awk command, avoiding issues with multiline variable interpolation and ensuring correct formatting and version substitution.

External Data Fetching and Error Handling:

  • Enhanced error handling when fetching the latest Safari version from the SOFA feed: now checks for valid JSON responses and API error messages using jq, and validates the curl exit code before proceeding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants