From 51887801b3e4a656effbbc1f6bc4b349142825fc Mon Sep 17 00:00:00 2001 From: Roman Kupriyanov Date: Sat, 17 Jul 2021 00:50:17 +0300 Subject: [PATCH] upgrade: use commit hash to set a specific version --- scripts/upgrade | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 841fc96..69ca2a8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -121,14 +121,18 @@ else # Remove the app directory securely ynh_secure_remove "$final_path" - # 1- Clone stable repo - $git clone https://github.com/friendica/friendica.git -b stable "$final_path" + # 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 $update_commit # Remove the addon directory securely ynh_secure_remove "$final_path/addon" # 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_update_commit # Restore the smarty3 folder cp -a "$tmpdir/view/smarty3" "$final_path/view/smarty3"