1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00

upgrade: cd git repo before resetting

This commit is contained in:
Roman Kupriyanov 2021-07-17 01:22:41 +03:00 committed by GitHub
parent 10033af6a8
commit 46eaf3df14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,7 +124,9 @@ else
# 1 - Clone stable repo
git clone https://github.com/friendica/friendica.git -b stable "$final_path"
# Reset branch to the level of update we needed
git reset --hard $version_commit
pushd "$final_path"
git reset --hard $version_commit
popd
# Remove the addon directory securely
ynh_secure_remove "$final_path/addon"
@ -132,7 +134,9 @@ else
# 2 - Clone addons repo
git clone https://github.com/friendica/friendica-addons.git -b stable "$final_path/addon"
# Reset addons branch to the level of update we needed
git reset --hard $addons_version_commit
pushd "$final_path/addon"
git reset --hard $addons_version_commit
popd
# Restore the smarty3 folder
cp -a "$tmpdir/view/smarty3" "$final_path/view/smarty3"