-
Notifications
You must be signed in to change notification settings - Fork 21
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
Retrieve the latest ES version #34
Conversation
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.
LGTM! At least on my Mac
Do you want to have a fallback in case the API response fails?
I think the beta / RC releases of 9.0.0 will be picked up as the last version, which is probably not what we want? #!/bin/bash
version_sort() {
awk -F'.' '
{
printf("%d %d %d %s\n", $1, $2, $3, $0)
}' | sort -n -k1,1 -k2,2 -k3,3 | awk '{print $4}'
}
awk -F'"' '/"version": *"/ {print $4}' stack.json | version_sort | tail -n 1 |
@xeraa I think start-local should install only stable release by default. I'm working to add also a parameter to the script to choose a different version. Using this param folks can decide which version, including a beta if it's available on docker.elastic.co. |
Yes, I also think that start-local should only pick stable releases. But if https://artifacts.elastic.co/releases/stack.json adds the beta and RC releases for 9.0.0 (which I assume it will), this PR will pick them up as the latest / highest version. |
@acsnyder I think the https://artifacts.elastic.co/releases/stack.json should only show stable releases of Elasticsearch, right? |
The file already includes releases like |
@xeraa I didn't notice it, thanks! In that case I think we should remove the |
@xeraa and @acsnyder I removed the |
This PR adds the
get_latest_version()
function to retrieve the latest Elasticsearch version automatically.