generate_docs.pl should be able to run on Windows
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
3.11 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Right now, generate_docs.pl runs like a dream on Linux! But there are a few issues that prevent it from running on Windows:
1) The script provides some paths to binaries installed by npm. Windows doesn't quite recognize those node_modules/bin/* commands. A cleaner, cross-platform approach would be to just call `npx gulp` or `npx antora`, freeing us from having to deal with the paths inside the node_modules directory.
2) On line 110, the script calls the system cp command (while Windows uses copy instead of cp). It seems like we could just use Perl's File::Copy instead?
3) The antora command on line 121 sets a bunch of environment variables in the same line as the command. Windows doesn't support this same line environment variables. Also, windows and linux use different commands to set envvars (set vs export) Maybe we can do that with gulp?
Making this script Windows-friendly would allow more documentation folks to build the docs.
Changed in evergreen: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in evergreen: | |
assignee: | nobody → Andrea Neiman (aneiman) |
Changed in evergreen: | |
assignee: | nobody → Andrea Neiman (aneiman) |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Here is a branch: https:/ /git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ sandbergja/ lp1930099_ generate_ docs_windows
It worked for me on both Windows and Mac OS.
To test on Windows:
1) Use the instructions provided in the comment at the top of generate_docs.pl.
2) Make sure that the locally generated documentation displays correctly in your browser.
To test for regressions on Linux or MacOs: Evergreen/ docs && perl generate_docs.pl` Evergreen/ docs/output/ index.html displays correctly in your browser.
1) `cd /path/to/
2) Make sure that the locally generated documentation at /path/to/