Closed jaylamb closed 3 years ago
The schematic PDF generation script looks good to me. Consider changing "$repository/deliverables"
to "$repository/schematic-pdfs"
since the directory will only contain schematic PDFs.
Please add the required .github/workflow/ci.yml
updates to the design. I think it would be a good idea to store the generated schematic PDFs as workflow artifacts to make a PR reviewer's job easier. 7 days seems like it would be a reasonable artifact retention period. More information about storing workflow data as artifacts can be found at https://docs.github.com/en/actions/guides/storing-workflow-data-as-artifacts.
A few things:
ci/generate-schematic-pdfs
, and the workflow job name should probably be changed to generate-schematic-pdfs
for consistency with other verbageArchive generated schematic PDF(s)
would be a more descriptive job step name than Archive production artifacts
schematic-pdfs
would be a more descriptive artifact name than upload-schematics
|
is not necessary for a single line path and thus that entry (?) could be changed to path: schematic-pdfs
Other than these, this design LGTM. I'll open a type-feature
issue for implementing this new feature shortly.
Feature Design
ci/generate-schematic-pdf
) which will create a directory (schematic-pdfs
) within the project repository. The directory should be the target for the KiAuto eeschema_do script's export function, which should generate PDFs for any schematic sheets belonging to the project.Feature Use Case
This CI job will run automatically as a part of pull requests, releases, etc... and will ensure that PDF versions of all schematic sheets are available for use by users/reviewers.
Detailed Design
ci/generate-schematic-pdf
to project:--help
: See other project scripts--version
: See other project scriptsfunction error()
: See other project scriptsfunction abort()
: See other project scriptsfunction display_help_text()
: See other project scriptsfunction display_version()
: See other project scriptsfunction main()
: See other project scriptsfunction generate_schematic_pdf()
:for schematic in "${schematics[@]}"; do if ! "$repository/utilities/KiAuto/src/eeschema_do" export -a "$schematic" "$repository/schematic-pdfs"; then abort fi done