mirror of
https://github.com/YunoHost-Apps/pgadmin_ynh.git
synced 2024-09-03 19:56:38 +02:00
Clean experimental Helper
This commit is contained in:
parent
0d9d960ed7
commit
b43f70d078
2 changed files with 1 additions and 44 deletions
|
@ -14,7 +14,7 @@
|
||||||
"email": "josue@tille.ch"
|
"email": "josue@tille.ch"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 3.3.1"
|
"yunohost": ">= 3.5.2.2"
|
||||||
},
|
},
|
||||||
"multi_instance": false,
|
"multi_instance": false,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -127,46 +127,3 @@ ynh_remove_uwsgi_service () {
|
||||||
#=================================================
|
#=================================================
|
||||||
# OTHERS HELPERS
|
# OTHERS HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Read the value of a key in a ynh manifest file
|
|
||||||
#
|
|
||||||
# usage: ynh_read_manifest manifest key
|
|
||||||
# | arg: manifest - Path of the manifest to read
|
|
||||||
# | arg: key - Name of the key to find
|
|
||||||
ynh_read_manifest () {
|
|
||||||
manifest="$1"
|
|
||||||
key="$2"
|
|
||||||
python3 -c "import sys, json;print(json.load(open('$manifest', encoding='utf-8'))['$key'])"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Read the upstream version from the manifest
|
|
||||||
# The version number in the manifest is defined by <upstreamversion>~ynh<packageversion>
|
|
||||||
# For example : 4.3-2~ynh3
|
|
||||||
# This include the number before ~ynh
|
|
||||||
# In the last example it return 4.3-2
|
|
||||||
#
|
|
||||||
# usage: ynh_app_upstream_version
|
|
||||||
ynh_app_upstream_version () {
|
|
||||||
manifest_path="../manifest.json"
|
|
||||||
if [ ! -e "$manifest_path" ]; then
|
|
||||||
manifest_path="../settings/manifest.json" # Into the restore script, the manifest is not at the same place
|
|
||||||
fi
|
|
||||||
version_key=$(ynh_read_manifest "$manifest_path" "version")
|
|
||||||
echo "${version_key/~ynh*/}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Read package version from the manifest
|
|
||||||
# The version number in the manifest is defined by <upstreamversion>~ynh<packageversion>
|
|
||||||
# For example : 4.3-2~ynh3
|
|
||||||
# This include the number after ~ynh
|
|
||||||
# In the last example it return 3
|
|
||||||
#
|
|
||||||
# usage: ynh_app_package_version
|
|
||||||
ynh_app_package_version () {
|
|
||||||
manifest_path="../manifest.json"
|
|
||||||
if [ ! -e "$manifest_path" ]; then
|
|
||||||
manifest_path="../settings/manifest.json" # Into the restore script, the manifest is not at the same place
|
|
||||||
fi
|
|
||||||
version_key=$(ynh_read_manifest "$manifest_path" "version")
|
|
||||||
echo "${version_key/*~ynh/}"
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue