diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 647765d..ab9cb6a 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -20,13 +20,9 @@ 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' | sort -V | tail -1) +version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name | (if startswith("v") then .[1:] else . end)' | sort -V | tail -1) assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) -# if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then -# version=${version:1} -# fi - # Setting up the environment variables echo "Current version: $current_version" echo "Latest release from upstream: $version" @@ -63,7 +59,7 @@ echo "Handling asset at $asset_url" # Here we base the source file name upon a unique keyword in the assets url (admin vs. update) # Leave $src empty to ignore the asset case $asset_url in - *".tar.gz"*) + *".tar.gz") src="app" ;; esac diff --git a/README.md b/README.md index 8b5a146..18f4739 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Privacy-respecting, hackable metasearch engine -**Shipped version:** 1.0.0~ynh4 +**Shipped version:** 1.0.0~ynh5 **Demo:** https://demo.yunohost.org/searx/ diff --git a/README_fr.md b/README_fr.md index db4e0ed..52c4697 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Méta-moteur de recherche respectueux de la vie privée et bidouillable -**Version incluse :** 1.0.0~ynh4 +**Version incluse :** 1.0.0~ynh5 **Démo :** https://demo.yunohost.org/searx/ diff --git a/conf/nginx.conf b/conf/nginx.conf index 9f7f927..2ec6fac 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,11 +1,6 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - uwsgi_param SCRIPT_NAME '__PATH_NO_ROOT__'; include uwsgi_params; uwsgi_modifier1 30; diff --git a/manifest.json b/manifest.json index 478f4f3..6ee2d08 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "fr": "Méta-moteur de recherche respectueux de la vie privée et bidouillable", "de": "Meta-Suchmaschine, die den Privatsphäre wahrt und 'hackable' ist" }, - "version": "1.0.0~ynh4", + "version": "1.0.0~ynh5", "url": "https://searx.github.io/searx/", "upstream": { "license": "AGPL-3.0-or-later", @@ -22,7 +22,7 @@ "email": "opi@zeropi.net" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": false, "services": [ diff --git a/scripts/install b/scripts/install index 2c6f59c..0da2b87 100644 --- a/scripts/install +++ b/scripts/install @@ -101,7 +101,6 @@ pip3 install --requirement $final_path/requirements-ynh.txt --no-cache-dir ynh_script_progression --message="Configuring Searx..." --weight=2 secret_key=$(ynh_string_random) - ynh_add_config --template="../conf/settings.yml" --destination="$final_path/searx/settings.yml" #================================================= diff --git a/scripts/restore b/scripts/restore index 6e6a996..bdf1d59 100755 --- a/scripts/restore +++ b/scripts/restore @@ -34,8 +34,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORE STEPS diff --git a/scripts/upgrade b/scripts/upgrade index 740e104..bf271b8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,7 +83,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=3 -# Create a temporary directory + # Create a temporary directory tmpdir="$(mktemp -d)" # Backup the config file in the temp dir @@ -97,7 +97,6 @@ then # Remove the tmp directory securely ynh_secure_remove --file="$tmpdir" - fi #================================================= @@ -138,7 +137,6 @@ pip3 install --requirement $final_path/requirements-ynh.txt --upgrade # ynh_script_progression --message="Configuring Searx..." --weight=2 # secret_key=$(ynh_string_random) - # ynh_add_config --template="../conf/settings.yml" --destination="$final_path/searx/settings.yml" #=================================================