mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1054 from autra/fix_ynh_app_upstream_version
Fix ynh_app_upstream_version : restore ability to read manifest
This commit is contained in:
commit
c7347ef04f
1 changed files with 8 additions and 2 deletions
|
@ -417,7 +417,7 @@ ynh_read_manifest () {
|
||||||
jq ".$manifest_key" "$manifest" --raw-output
|
jq ".$manifest_key" "$manifest" --raw-output
|
||||||
}
|
}
|
||||||
|
|
||||||
# Read the upstream version from the manifest
|
# Read the upstream version from the manifest, or from the env variable $YNH_APP_MANIFEST_VERSION if not given
|
||||||
#
|
#
|
||||||
# usage: ynh_app_upstream_version [--manifest="manifest.json"]
|
# usage: ynh_app_upstream_version [--manifest="manifest.json"]
|
||||||
# | arg: -m, --manifest= - Path of the manifest to read
|
# | arg: -m, --manifest= - Path of the manifest to read
|
||||||
|
@ -437,7 +437,13 @@ ynh_app_upstream_version () {
|
||||||
# Manage arguments with getopts
|
# Manage arguments with getopts
|
||||||
ynh_handle_getopts_args "$@"
|
ynh_handle_getopts_args "$@"
|
||||||
|
|
||||||
version_key=$YNH_APP_MANIFEST_VERSION
|
if [[ "$manifest" != "" ]] && [[ -e "$manifest" ]];
|
||||||
|
then
|
||||||
|
version_key=$(ynh_read_manifest --manifest="$manifest" --manifest_key="version")
|
||||||
|
else
|
||||||
|
version_key=$YNH_APP_MANIFEST_VERSION
|
||||||
|
fi
|
||||||
|
|
||||||
echo "${version_key/~ynh*/}"
|
echo "${version_key/~ynh*/}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue