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

Latest version detection #43

Closed
jkroepke opened this issue Sep 20, 2022 · 5 comments · Fixed by #44
Closed

Latest version detection #43

jkroepke opened this issue Sep 20, 2022 · 5 comments · Fixed by #44

Comments

@jkroepke
Copy link
Collaborator

The current workflow uses the official Lens auto-update mechanism (https://lens-binaries.s3.amazonaws.com/ide/latest-mac.yml) to detect the latest version.

Since this repo does not depend on official Lens builds, consider to switch the latest version detection based on the git tags on https://github.com/lensapp/lens/

e.g.

curl -sSfL https://github.com/lensapp/lens/releases.atom | grep -oP "(?<=<title>)v[^<]+" | head -n1
v6.1.0

requires gnu grep (may not work in mac os)

@mawatech
Copy link

You could also use the github API:

curl -s https://api.github.com/repos/lensapp/lens/releases/latest | jq .tag_name | grep -oP "(\d+(:?\.\d+)+)" | head -n 1

@mawatech
Copy link

Btw., seems they changed their version system, at least in the yml:

curl -s https://lens-binaries.s3.amazonaws.com/ide/latest-mac.yml | grep -o "version:.*-latest"
--> version: 2022.9.201328-latest

@jkroepke
Copy link
Collaborator Author

It seems like this need to be changes in anyways.

@MuhammedKalkan
Copy link
Owner

Yup, @jkroepke can you test these cli commands at your fork and create a PR if successful

@jkroepke
Copy link
Collaborator Author

You could also use the github API:

curl -s https://api.github.com/repos/lensapp/lens/releases/latest | jq .tag_name | grep -oP "(\d+(:?\.\d+)+)" | head -n 1

curl -s https://api.github.com/repos/lensapp/lens/releases/latest | jq -r '.tag_name[1:]'

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 a pull request may close this issue.

3 participants