mirror of
https://github.com/YunoHost-Apps/sharkey_ynh.git
synced 2024-09-03 20:16:32 +02:00
Fix restore + upgrade
This commit is contained in:
parent
912c3429a1
commit
5908f0ba0d
3 changed files with 25 additions and 4 deletions
|
@ -30,6 +30,20 @@ chown -R $app:www-data "$install_dir"
|
||||||
# Define and install dependencies
|
# Define and install dependencies
|
||||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REINSTALL PNPM
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Reinstalling PNPM..." --weight=1
|
||||||
|
|
||||||
|
# Define and install pnpm
|
||||||
|
pushd "$install_dir"
|
||||||
|
ynh_use_nodejs
|
||||||
|
corepack enable
|
||||||
|
corepack prepare pnpm@latest --activate
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install --frozen-lockfile
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm build
|
||||||
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE NGINX CONFIGURATION
|
# RESTORE THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -31,8 +31,11 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..."
|
ynh_script_progression --message="Upgrading source files..."
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
pushd $install_dir
|
||||||
ynh_setup_source --dest_dir="$install_dir" --keep=".config/default.yml"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app git checkout stable
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app git pull --recurse-submodules
|
||||||
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 750 "$install_dir"
|
chmod 750 "$install_dir"
|
||||||
|
@ -60,8 +63,6 @@ ynh_add_nginx_config
|
||||||
ynh_script_progression --message="Building app..."
|
ynh_script_progression --message="Building app..."
|
||||||
|
|
||||||
pushd "$install_dir"
|
pushd "$install_dir"
|
||||||
ynh_exec_warn_less git checkout stable
|
|
||||||
ynh_exec_warn_less git pull --recurse-submodules
|
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm cleanall
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm cleanall
|
||||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install --frozen-lockfile
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install --frozen-lockfile
|
||||||
|
|
|
@ -2,6 +2,12 @@ test_format = 1.0
|
||||||
|
|
||||||
[default]
|
[default]
|
||||||
|
|
||||||
|
# -------------------------------
|
||||||
|
# Default args to use for install
|
||||||
|
# -------------------------------
|
||||||
|
|
||||||
|
exclude = ["change_url"]
|
||||||
|
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
# Commits to test upgrade from
|
# Commits to test upgrade from
|
||||||
# -------------------------------
|
# -------------------------------
|
Loading…
Add table
Reference in a new issue