1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cesium_ynh.git synced 2024-09-03 18:06:25 +02:00

[enh] get upstream version from a unique file.

This commit is contained in:
Moul 2016-06-15 21:44:43 +00:00
parent 4fda30c769
commit e052c1ea9c
3 changed files with 3 additions and 2 deletions

1
conf/upstream_version Normal file
View file

@ -0,0 +1 @@
0.1.18

View file

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

View file

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