1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse-admin_ynh.git synced 2024-09-03 20:26:34 +02:00
This commit is contained in:
ericgaspar 2021-08-06 21:00:06 +02:00
parent 422f8053cd
commit 325de5c0f6
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 13 additions and 9 deletions

View file

@ -4,8 +4,7 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
# dependencies used by the app version_commit="5262518699e86852feb3967f65d1dc6376c3d069"
pkg_dependencies=""
nodejs_version=12 nodejs_version=12

View file

@ -84,9 +84,13 @@ ynh_script_progression --message="Setting up source files..." --weight=2
ynh_app_setting_set --app=$app --key=final_path --value=$final_path ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir=$final_path #ynh_setup_source --dest_dir=$final_path
#git clone https://github.com/Awesome-Technologies/synapse-admin.git "$final_path" --quiet git clone --quiet https://github.com/Awesome-Technologies/synapse-admin.git -b master "$final_path"
# Reset branch to the level of update we needed
pushd "$final_path"
git reset --hard --quiet $version_commit
popd
chmod 750 "$final_path" chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"

View file

@ -79,11 +79,12 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --weight=160 ynh_script_progression --message="Upgrading source files..." --weight=160
# Remove the app directory securely pushd "$final_path"
ynh_secure_remove --file=$final_path git fetch --quiet
git checkout stable --quiet
# Download, check integrity, uncompress and patch the source from app.src git pull --quiet
ynh_setup_source --dest_dir=$final_path git reset --hard $version_commit --quiet
popd
fi fi
chmod 750 "$final_path" chmod 750 "$final_path"