Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check in help-all.json for posterity #43

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/sync_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
- run: |
rm -rf "pantsbuild.org/${{ steps.get-destination-dir.outputs.DESTINATION_DIR }}"
mkdir "pantsbuild.org/${{ steps.get-destination-dir.outputs.DESTINATION_DIR }}"
cp help-all.json "pantsbuild.org/${{ steps.get-destination-dir.outputs.DESTINATION_DIR }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't comment directly on the line, but the pants help-all invocation used in this script appears to be different to the one in the PR description; is that intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean with regards to backend packages? If so, see #44

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah; cool 👍


# Generate reference docs
- name: Setup Node
Expand All @@ -79,7 +80,7 @@ jobs:
- run: yarn install --frozen-lockfile
working-directory: pantsbuild.org
- name: Generate reference docs
run: npm run generate-reference "${{ steps.get-destination-dir.outputs.DESTINATION_DIR }}" ../help-all.json
run: npm run generate-reference "${{ steps.get-destination-dir.outputs.DESTINATION_DIR }}"
working-directory: pantsbuild.org

# Sync the docs repo
Expand Down
99,487 changes: 99,487 additions & 0 deletions docs/reference/help-all.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions reference_codegen/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ const fs = require("fs");
const path = require("path");
const he = require("he");

const helpAll = JSON.parse(fs.readFileSync(process.argv[3], "utf8"));
const reference_dir = path.join(process.argv[2], "reference");
const helpAll = JSON.parse(
fs.readFileSync(path.join(reference_dir, "help-all.json"), "utf8")
);
const subsystemTemplate = fs.readFileSync(
"reference_codegen/subsystem.mdx.mustache",
"utf8"
Expand Down Expand Up @@ -137,7 +140,6 @@ Object.entries(helpAll.name_to_target_type_info).forEach(([name, info]) => {
});
});

const reference_dir = path.join(process.argv[2], "reference");
fs.mkdirSync(reference_dir);
process.chdir(reference_dir);
fs.mkdirSync("goals");
Expand Down
Loading