1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/searx_ynh.git synced 2024-09-03 20:16:30 +02:00

Merge pull request #104 from YunoHost-Apps/testing

Testing
This commit is contained in:
tituspijean 2022-01-04 08:59:23 +01:00 committed by GitHub
commit 1466ec2bc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 8 additions and 21 deletions

View file

@ -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

View file

@ -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/

View file

@ -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/

View file

@ -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;

View file

@ -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": [

View file

@ -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"
#=================================================

View file

@ -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

View file

@ -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"
#=================================================