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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion quickget
Original file line number Diff line number Diff line change
Expand Up @@ -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.

}

function releases_kali() {
Expand Down