-
-
Notifications
You must be signed in to change notification settings - Fork 126
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(gitkraken): empty VERSION_PUBLISHED (fixes #1248) #1249
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,9 +1,10 @@ | ||||||
DEFVER=1 | ||||||
get_website "https://help.gitkraken.com/gitkraken-client/current/" | ||||||
ARCHS_SUPPORTED="amd64" | ||||||
get_website "https://www.gitkraken.com/download/linux-deb" | ||||||
if [ "${ACTION}" != "prettylist" ]; then | ||||||
VERSION_PUBLISHED=$(grep -m 1 'id="version-' "${CACHE_FILE}" | sed -e 's/<[^>]*>//g' | cut -d' ' -f2) | ||||||
VERSION_PUBLISHED=$(sed -n -E "0,/.*name:\s*'([^']+)'/s//\1/p" "${CACHE_FILE}") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. VERSION_PUBLISHED=$(grep -E 'name:.*' $CACHE_FILE | grep -Eo '([[:digit:]]+\.)+[[:digit:]]+' ) Not a single elegant There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. VERSION_PUBLISHED=$(sed -n -E "s/.*name:\s*'([0-9]+\.[0-9]+\.[0-9]+).*/\1/p" "$CACHE_FILE")
I cannot understand at all why this clunky thing works but your elegant and simple one adds a Ctrl-M 🤷 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This works and appears to successfully dispense with the CTRL-M while capturing whatever's between the quotes. |
||||||
fi | ||||||
URL="https://release.gitkraken.com/linux/gitkraken-amd64.deb" | ||||||
PRETTY_NAME="GitKraken" | ||||||
WEBSITE="https://www.gitkraken.com/invite/ieih1QR3" | ||||||
WEBSITE="https://www.gitkraken.com/git-client" | ||||||
SUMMARY="Intuitive Git GUI & powerful Git CLI." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This results in a CTRL-M at the end of the published version,which upsets
dpkg --compare-versions
when you update.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@philclifford Sorry, I'm not sure what, exactly, the error is. Is there a Ctrl-M at the end of the version?
I tested it, and it installed fine on Ubuntu 24.04, using the above command. I will retest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sorry to be unclear (at 4am ;-) ) - it is a Ctrl-M at the end of the version. That only really affects update (because
dpkg --compare-versions
complains ) and probably upgrade (which will continually want to upgrade because the compare "fails" ). Install will work fine as it just fetches the deb and installs it without comparing (except if the deb turns out to be the same version it'll skip the install )