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

Auto detect latest release if "latest" is used #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GuybrushX
Copy link

Should fix #1

@sandrich
Copy link
Owner

Thanks @GuybrushX for the contribution. I have adde a comment inline. I think we should not use jq has the majority does not have it installed. Rather use sed or awk

@GuybrushX
Copy link
Author

Quick research on using sed or awk to parse JSON seems to be pretty hacky.

What do you think about using Python instead?

Here are some examples, also using the GitHub API so I think it should work - just have to fiddle around with Python:
https://stackoverflow.com/questions/1955505/parsing-json-with-unix-tools

Is it safe to assume that Python 3 is installed?

@sandrich
Copy link
Owner

I think python is even worse I have already found some system without curl installed :D let me think about it

@sandrich
Copy link
Owner

sandrich commented Sep 23, 2022

This could be a version of it

curl -s "https://api.github.com/repos/DeFiCh/ain/releases/latest" | grep tag_name | sed -r 's/.*"v(.*)",$/\1/g'

There are some installations without curl. We probably need to check if curl is installed

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.

auto detect current release
2 participants