mirror of
https://github.com/YunoHost-Apps/firefly-iii_ynh.git
synced 2024-09-03 18:36:13 +02:00
Update upgrade
This commit is contained in:
parent
0eedd3d5ef
commit
9942c72676
1 changed files with 4 additions and 23 deletions
|
@ -90,17 +90,6 @@ then
|
||||||
if [ `cd $final_path && git rev-parse --is-inside-work-tree` ];
|
if [ `cd $final_path && git rev-parse --is-inside-work-tree` ];
|
||||||
then
|
then
|
||||||
pushd "$final_path"
|
pushd "$final_path"
|
||||||
if [ $update -eq 1 ]
|
|
||||||
then
|
|
||||||
git fetch --quiet origin tag $latest_tag --no-tags
|
|
||||||
git checkout --quiet $latest_tag
|
|
||||||
else
|
|
||||||
git fetch --quiet origin tag $tag --no-tags
|
|
||||||
git checkout --quiet $tag --quiet
|
|
||||||
fi
|
|
||||||
ynh_secure_remove --file="$final_path/bootstrap/cache/*"
|
|
||||||
ynh_secure_remove --file="$final_path/vendor/"
|
|
||||||
popd
|
|
||||||
else
|
else
|
||||||
ynh_script_progression --message="Upgrading source files..."
|
ynh_script_progression --message="Upgrading source files..."
|
||||||
# Create a temporary directory
|
# Create a temporary directory
|
||||||
|
@ -117,17 +106,9 @@ then
|
||||||
ynh_secure_remove --file="$final_path"
|
ynh_secure_remove --file="$final_path"
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
if [ $update -eq 1 ]
|
ynh_setup_source --dest_dir=$final_path
|
||||||
then
|
|
||||||
|
|
||||||
git clone --quiet -b $latest_tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path
|
|
||||||
|
|
||||||
else
|
|
||||||
git clone --quiet -b $tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
ynh_secure_remove bootstrap/cache/*
|
ynh_secure_remove bootstrap/cache/*
|
||||||
|
|
||||||
# Restore the config file and data
|
# Restore the config file and data
|
||||||
mkdir -p "$final_path/storage/upload/"
|
mkdir -p "$final_path/storage/upload/"
|
||||||
mkdir -p "$final_path/storage/export/"
|
mkdir -p "$final_path/storage/export/"
|
||||||
|
|
Loading…
Reference in a new issue