Skip to content

Commit

Permalink
Generate reference docs with all backends enabled (#44)
Browse files Browse the repository at this point in the history
This change fixes #42
by re-running the `help-all` command with every backend enabled. The
list of backends is calculated by using all the keys of
`.name_to_backend_help_info` from a run of `help-all`.
  • Loading branch information
thejcannon authored Jan 2, 2024
1 parent daed247 commit 7885590
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/sync_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ jobs:
curl --proto '=https' --tlsv1.2 -fsSL https://static.pantsbuild.org/setup/get-pants.sh | bash
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Generate help JSON
# Run the command twice, since the first run might put extraneous crap on stdout
# First run `help-all` which will contain the list of every backend in the `name_to_backend_help_info` object,
# then run it again with every backend enabled.
# NB: We run the command initially twice, since the first run might put extraneous crap on stdout.
run: |
touch pants.toml
PANTS_VERSION="${{ inputs.version }}" pants help-all > /dev/null
PANTS_VERSION="${{ inputs.version }}" pants help-all > help-all.json
PANTS_VERSION="${{ inputs.version }}" pants --backend-packages=[$(jq -r '.name_to_backend_help_info | keys_unsorted | map("\"" + . + "\"") | join(",")' help-all.json)] help-all > help-all.json
# Checkout both repos
- name: Checkout pants repo
Expand Down

0 comments on commit 7885590

Please sign in to comment.