-
Notifications
You must be signed in to change notification settings - Fork 3
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
Consider adding a script to automatically clean old files #24
Comments
super down for this. This annoys me pretty often |
Based on proposed changes in #28, we will have to be careful not to remove any *.md files in the api folder. |
ok yeah. I think I can put them in a different directory without changing the URL. We should do that with the automatically exported SVGs as well, right? I just assume it's simpler to delete directories without sorting file extensions. I'll make it a .bat or .ps1 script unless there are any objections. |
The SVGs are fairly simple, since we can assume that the only filetype to be deleted in the workflows directories are *.svg files. Plus, we really don't want to delete all of the *.bonsai files in those directories! I more so wanted to make sure we were excluding the correct files from other directories (i.e., don't delete .gitignore and *.md files). Moving these markdown files out makes it easier. I have no preference on the script type, as long as we highlight it in the README so everyone understands how to use it. |
I want to extend this issue to making a script for linkchecking and wanted to know what you think and if you have any input @bparks13 |
@cjsha are you thinking about making two scripts, one for linkchecking and the other for cleaning? I think that's a really good idea actually, but it might require that we package |
To do a proper linkcheck, the script should start from a clean build anyway, so I was thinking I would just put both in one script and depending on what the user wants to do they could run |
Hmm, I can see the benefit of packing a utility script all together. If we go this route, I would recommend that we keep the utilities totally separate and only run when the explicit flag is given. So then here is my proposal:
As I write this out I wonder if there is some way to read the actions file and directly pull out the commands from there? We don't want to get into a situation where the two scripts become desynchronized, because then local builds could succeed when the actions fail, or vice versa. |
Also, to stick with convention, any words we use as flags should be preceded by |
Ah great idea. I did a brief search, and I came across the suggestion to put all the linkcheck commands in the powershell script and to run the powershell script during the GitHub Actions build process (instead of trying to pull the commands into the powershell script from the build.yml). This seems like the most simple way to keep these things synchronized.
I had the same thought but it seems Powershell scripts have
This is fine. It is annoying to export all .svgs every time if I just wanna do a lychee linkcheck. Do we prefer |
I'm also not immediately sure there's be a way to run |
That sounds great to me, let me know whenever this is finalized and merged, then I'll work on integrating the script into the actions. I think that makes the most sense
Got it, I'm not as familiar with Powershell but if that's already there then we can utilize it
What would be an intermediate then? If we are already splitting functionality, maybe we can word it in a way so that the lychee check is separate from the other checks? Also I'm fine with Maybe we split it up so that we have:
Obviously |
- Add a powershell script to clean files and check links - Add note in README regarding the bullet point above - Fix typos in README Misc changes not related to above issues: - index.md configured with landing page metadata in docfx.json and removed relevant metadata from the file itself - docfx.json files files entry refactored to be more succinct
…ly (#53) * Resolve issues #24 & #43 - Add a powershell script to clean files and check links - Add stuff in README regarding the bullet point above including a dedicated section - Fix typos in README Miscellaneous: - docfx.json files entry refactored to be more succinct - index.md configured with landing page metadata in docfx.json and removed relevant metadata from the file itself
When using Sphinx, there was an option in the
make
command toclean
a directory to remove stale files that are not correctly being served anymore.There is no readily available option for this in docfx that I have found, but we should be able to create a script that can automatically remove files from the _site directory, remove any existing SVG files that might have an old filename attached to them, and delete the files from the api directory in the case that the submodule has been updated and file names have changed.
There might be other things we can automate with this to help keep the working directory clean, but I think this covers the majority of cases.
The text was updated successfully, but these errors were encountered: