Fix examples auto-generation #227
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the motivation?
The "Update generated content" workflow currently fails because required directories are not present.
What does this change do?
The PR simplifies the download of the required input files
default.provisioners.yamlfor score-compose andzz-default.provisioners.yamlfor score-k8s to usewgetinstead of agit read-treewhich obtains the entire directories. That is not required. The change now also creates the target dirs first. This is done inpackage.json.Note: The file
transform-default-resource-provisioners.jsdeletes those directories after parsing the input files so themkdirshould not fail on the next run.As an unrelated issues found during testing, the example page generation currently does not delete previously generated pages. Any source example files that have been removed from the sources will leave those pages behind, causing Hugo build errors because the embedded source files cannot be found anymore. The change to
gen-example-pages.jsaddresses this issue.What is your testing strategy?
I ran the command
npm run gen-allthat is executed by the "Update generated content" workflow locally.Is this related to any issues?
No.
Have you read the Contributing Guidelines?