Closed mtlynch closed 5 months ago
Adding to this, I think we could also consider updating our documentation regarding the following points:
publish-release
script, if you forget to specify the $GITHUB_TOKEN
env variable; only the first of all 52 lines is actually relevant/specific to the error.while [[ "$#" -gt 0 ]]; do
to while (( "$#" > 0 )); do
for parsing flags.@jotaen4tinypilot - Can you create those as separate bugs? I want to keep each bug tightly scoped so that we don't end up ballooning up scope when we try to improve the style guides.
We could consider switching from while [[ "$#" -gt 0 ]]; do to while (( "$#" > 0 )); do for parsing flags.
This one is small enough that it can just be a direct PR.
Actually, if any of them are less than 2 hours, you can just submit them as direct PRs if you feel inclined.
I think the --help
topic would warrant it’s own ticket, also to give appropriate room for discussion if need be.
The 2 points (( "$#" > 0 ))
and “positional vs flags” I’ve noted on my todo list, and will do them on the side in the next days.
In https://github.com/tiny-pilot/tinypilot/pull/1768, we added a way to parse some flags in our bash script and then pass the remaining flags to a subprocess we call at the end of the script.
We should document this as the standard way of performing this so that we don't have to reinvent the wheel in the future.