1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/elasticsearch8_ynh.git synced 2024-09-03 18:26:26 +02:00

Change package to fetch version 8 of ElasticSearch

This commit is contained in:
Florent 2023-01-13 12:49:11 +01:00
parent b65a0b5cfe
commit 2dfdd7e475
3 changed files with 6 additions and 5 deletions

View file

@ -17,7 +17,7 @@
current_version=$(cat manifest.json | jq -j '.version|split("~")[0]')
repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]')
# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions)
version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true) | .tag_name | select( startswith("v7") )' | sort -V | tail -1)
version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true) | .tag_name | select( startswith("v8") )' | sort -V | tail -1)
# Later down the script, we assume the version has only digits and dots
# Sometimes the release name starts with a "v", so let's filter it out.
@ -105,7 +105,8 @@ done
#=================================================
# Replace new version in manifest
echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json
admindoc="https://www.elastic.co/guide/en/elasticsearch/reference/$(echo $version | grep -Po "^\d+\.\d+")/elasticsearch-intro.html"
echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\" | .upstream.admindoc = \"$admindoc\"" manifest.json)" > manifest.json
# No need to update the README, yunohost-bot takes care of it

View file

@ -11,7 +11,7 @@
## -Xms4g
## -Xmx4g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/advanced-configuration.html
## See https://www.elastic.co/guide/en/elasticsearch/reference/8.6/advanced-configuration.html
## for more information
##
################################################################

View file

@ -1,6 +1,6 @@
{
"name": "ElasticSearch 7",
"id": "elasticsearch7",
"name": "ElasticSearch 8",
"id": "elasticsearch8",
"packaging_format": 1,
"description": {
"en": "Distributed and RESTful search engine.",