diff --git a/conf/upstream_version b/conf/upstream_version new file mode 100644 index 0000000..f8bc4c6 --- /dev/null +++ b/conf/upstream_version @@ -0,0 +1 @@ +0.1.18 diff --git a/scripts/install b/scripts/install index 15e656d..8e00081 100755 --- a/scripts/install +++ b/scripts/install @@ -8,7 +8,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$YNH_APP_ARG_DOMAIN path=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC -version="0.1.18" # Source YunoHost helpers source /usr/share/yunohost/helpers @@ -23,6 +22,7 @@ sudo yunohost app checkurl "${domain}${path}" -a "$app" \ # Retrieve sources and install them src_path=/var/www/$app sudo mkdir -p $src_path +version=$(cat ../conf/upstream_version) wget -nc --quiet https://github.com/duniter/cesium/releases/download/$version/cesium-web-$version.zip -P /tmp sudo unzip -q /tmp/cesium-web-$version.zip -d $src_path sudo chown -R www-data: $src_path diff --git a/scripts/upgrade b/scripts/upgrade index b0db881..46dbe73 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,7 +11,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get "$app" domain) path=$(ynh_app_setting_get "$app" path) is_public=$(ynh_app_setting_get "$app" is_public) -version="0.1.18" # Remove trailing "/" for next commands path=${path%/} @@ -20,6 +19,7 @@ path=${path%/} src_path=/var/www/$app sudo rm -rf $src_path sudo mkdir -p $src_path +version=$(cat ../conf/upstream_version) wget -nc --quiet https://github.com/duniter/cesium/releases/download/$version/cesium-web-$version.zip -P /tmp sudo unzip -q /tmp/cesium-web-$version.zip -d $src_path sudo chown -R www-data: $src_path