Skip to content

Fix a command to get the latest version in install.sh #4636

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

Closed
wants to merge 1 commit into from
Closed

Fix a command to get the latest version in install.sh #4636

wants to merge 1 commit into from

Conversation

tenzen-y
Copy link

@tenzen-y tenzen-y commented Dec 16, 2021

We can not get the latest version using install.sh as the below.

$ curl -fsSL https://code-server.dev/install.sh | sh
Ubuntu 20.04.3 LTS
Installing vhttps://github.com/coder/code-server/releases/tag/v3.12.0 of the amd64 deb package from GitHub.

+ mkdir -p ~/.cache/code-server
+ curl -#fL -o ~/.cache/code-server/code-server_https://github.com/coder/code-server/releases/tag/v3.12.0_amd64.deb.incomplete -C - https://github.com/cdr/code-server/releases/download/vhttps://github.com/coder/code-server/releases/tag/v3.12.0/code-server_https://github.com/coder/code-server/releases/tag/v3.12.0_amd64.deb
curl: (22) The requested URL returned error: 404 Not Found############## 100.0%##O#-#

It looks like this can not get a version out of https://github.com/coder/code-server/releases/tag/v3.12.0.

$ version="$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://github.com/cdr/code-server/releases/latest)"
$ echo "${version#https://github.com/cdr/code-server/releases/tag/}"
https://github.com/coder/code-server/releases/tag/v3.12.0

So, this PR fixes a command to get the latest version in install.sh.
Also, I have confirmed that it works with the following.

$ version="$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://github.com/cdr/code-server/releases/latest)"
$ echo "${version#https://github.com/coder/code-server/releases/tag/}"
v3.12.0

Fixes #4634

Copy link
Contributor

@jsjoeio jsjoeio left a comment

Choose a reason for hiding this comment

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

You're quick! We switched GitHub orgs within the last 24hrs. Thanks for fixing this!

@jsjoeio
Copy link
Contributor

jsjoeio commented Dec 16, 2021

Argh, looks like we're going to need to update this in a lot of places

image

@tenzen-y
Copy link
Author

Thank you for your review!
Since #4638 seems to have fixed this problem, I'd like to close this PR.
Does it sound good to you? @jsjoeio

@jsjoeio
Copy link
Contributor

jsjoeio commented Dec 16, 2021

@tenzen-y ah right! Good call. Yes, sounds good. Thank you so much for the quick reply and for offering to fix this! We really appreciate it.

@jsjoeio jsjoeio closed this Dec 16, 2021
@tenzen-y tenzen-y deleted the fix-install-script branch December 16, 2021 17:16
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.

Using install.sh fails on Ubuntu 20.04
2 participants