elastic / start-local

Try Elasticsearch and Kibana locally
Apache License 2.0
31 stars 7 forks source link

ES_LOCAL_VERSION env variables is empty #11

Open xiaohongred opened 2 weeks ago

xiaohongred commented 2 weeks ago

es_version="$(get_latest_version)"

Returns the latest Elasticsearch tag version

get_latest_version() { local tags="$(curl -s "https://api.github.com/repos/elastic/elasticsearch/tags")" local latest="$(echo "$tags" | grep -m 1 '"name"' | grep -Eo '[0-9.]+')" echo $latest }

link "https://api.github.com/repos/elastic/elasticsearch/tags" have rate limit, i offen get empty ES_LOCAL_VERSION env variable

xiaohongred commented 2 weeks ago

It may be because my company is using a network proxy.

ezimuel commented 2 weeks ago

@xiaohongred good point, I think other people can be in the same situation. I'm thinking to write the latest version in the script and update it when we have a new Elasticsearch release. In this way we don't need anymore to invoke the github API.