mirror of
https://github.com/YunoHost-Apps/kimai2_ynh.git
synced 2024-09-03 19:26:26 +02:00
Update upgrade
This commit is contained in:
parent
db37b4014e
commit
44917f6dab
1 changed files with 4 additions and 6 deletions
|
@ -106,15 +106,14 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
|
|||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
||||
latest_tag=$(curl -s https://api.github.com/repos/kevinpapst/kimai2/releases/latest | grep 'tag_name' | cut -d\" -f4)
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
if [ `cd $final_path && git rev-parse --is-inside-work-tree` ]; then
|
||||
pushd "$final_path"
|
||||
if [ $update -eq 1 ]
|
||||
then
|
||||
git fetch origin tag $latest_tag --no-tags
|
||||
git checkout $latest_tag
|
||||
git fetch --quiet origin tag $latest_tag --no-tags
|
||||
git checkout --quiet $latest_tag
|
||||
else
|
||||
git fetch origin tag $tag --no-tags
|
||||
git checkout $tag
|
||||
|
@ -140,12 +139,11 @@ then
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
if [ $update -eq 1 ]
|
||||
then
|
||||
git clone -b $latest_tag --depth 1 https://github.com/kevinpapst/kimai2.git $final_path
|
||||
git clone --quiet -b $latest_tag --depth 1 https://github.com/kevinpapst/kimai2.git $final_path
|
||||
else
|
||||
git clone -b $tag --depth 1 https://github.com/kevinpapst/kimai2.git $final_path
|
||||
git clone --quiet -b $tag --depth 1 https://github.com/kevinpapst/kimai2.git $final_path
|
||||
fi
|
||||
|
||||
|
||||
# Restore config
|
||||
if [ -f $tmpdir/local.yaml ]; then
|
||||
cp -af "$tmpdir/local.yaml" "$final_path/config/packages/."
|
||||
|
|
Loading…
Add table
Reference in a new issue