Open xiaohongred opened 2 weeks ago
It may be because my company is using a network proxy.
@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.
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