Skip to content
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

Allow users to install any release via install.sh #49

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

crschardt
Copy link
Contributor

@crschardt crschardt commented Jan 27, 2025

This PR fixes several problems with the install.sh script:

  1. The script relied on the GitHub rest API to get a list of releases. The return from the API is paginated and only returns 30 items by default. The script now has an optional count argument for the -l option that allows the user to specify how many releases should be returned.
  2. More significantly, the script was using the returned list of releases to determine if a release is available. Since the list was truncated to 30 items, older releases such as the 2023.4.2 version were not seen as available. The script now checks directly with the REST API to determine if a release is available, so the pagination is no longer an issue.
  3. Parsing of options with optional arguments was not being done correctly when the short version of the option was used. This is now working correctly.
  4. Added a "Test" option that skips all commands that directly make changes to the system. This makes it easier to debug the script without risking making unwanted changes.
  5. The script used a pretty restrictive filter for which releases to list and it wouldn't allow users to install "Dev" or "rc" releases. The filter is now much less restrictive.

Documentation update: PhotonVision/photonvision#1746

@crschardt crschardt marked this pull request as ready for review January 27, 2025 00:45
@crschardt crschardt changed the title Fix checking for releases Allow users to install any release via install.sh Jan 27, 2025
@crschardt
Copy link
Contributor Author

I tested the image on an OPi5 and it works as expected.

@crschardt
Copy link
Contributor Author

Thanks for the approval. I’m going to hold off on merging because I got funny behavior from the RPi image on first boot and I need to track down root cause. The image starts on first power up, but hangs rather than rebooting after the initial stages. After manually rebooting, the system works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants