Conversation
acsnyder
left a comment
There was a problem hiding this comment.
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.