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

fix: change holoiso regexp to match shorter release tags #1302

Closed

Conversation

philclifford
Copy link
Contributor

fixes #1301

@@ -828,7 +828,7 @@ function editions_haiku() {
}

function releases_holoiso() {
web_pipe "https://github.com/HoloISO/releases/releases/latest" | grep -o -e 'releases/tag/[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]' | head -n 1 | cut -d'/' -f 3
web_pipe "https://github.com/HoloISO/releases/releases/latest" | grep -o -e 'releases/tag/[[:digit:]]\+\(\.[[:digit:]]\+\)*' | head -n 1 | cut -d'/' -f 3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most other releases_ and get_ functions rely on the GitHub API, which is almost certainly a better idea for performance & stability reasons.
Additionally, the preferred style for quickget releases & editions functions appears to always involve use of echo, whether or not it's necessary.

Suggested change
web_pipe "https://github.com/HoloISO/releases/releases/latest" | grep -o -e 'releases/tag/[[:digit:]]\+\(\.[[:digit:]]\+\)*' | head -n 1 | cut -d'/' -f 3
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://api.github.com/repos/HoloISO/releases/releases" | grep "tag_name" | cut -d'"' -f 4 | head -n +2)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Releases should also never be truncated to the length 1, since in that case there's no point checking for releases, just offer the user a "latest" option and determine the latest release within the get_ function.

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.

bug: holoiso release tag no longer found
2 participants