From 8ea9b947babf6a7f278e2f6c1b1603eaf25a778f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 28 Apr 2021 02:05:01 +0200 Subject: [PATCH] Cleanup --- scripts/install | 6 ++++-- scripts/upgrade | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index b8715ed..d66b0ca 100644 --- a/scripts/install +++ b/scripts/install @@ -166,6 +166,8 @@ pushd $final_path/$app/js sudo -u $app env PATH=$PATH NODE_BUILD_MEMORY=1024 yarn run build popd +ynh_secure_remove --file="$final_path/$app/js" + ynh_script_progression --message="Building Elixir application (this is going to take a while...)" pushd $final_path/$app sudo -u "$app" MIX_ENV=prod mix local.hex --force @@ -194,13 +196,13 @@ pushd $final_path/$app sudo -u "$app" MIX_ENV=prod mix mobilizon.users.new "$admin_email" --admin --password "$password" popd +ynh_secure_remove --file="$final_path/.cache" + ynh_store_file_checksum --file="$config" chmod 400 "$config" chown $app:$app "$config" -ynh_secure_remove --file="$final_path/.cache" - #================================================= # SETUP SYSTEMD #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2afb2b5..4604a14 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -229,8 +229,11 @@ pushd $final_path/$app/js sudo -u $app env PATH=$PATH yarn install ynh_script_progression --message="Building NodeJS application (this is going to take a while...)" sudo -u $app env PATH=$PATH NODE_BUILD_MEMORY=1024 yarn run build + sudo -u $app env PATH=$PATH yarn cache clean --all popd +ynh_secure_remove --file="$final_path/$app/js" + ynh_script_progression --message="Building Elixir application (this is going to take a while...)" pushd $final_path/$app sudo -u "$app" MIX_ENV=prod mix local.hex --force @@ -240,6 +243,8 @@ pushd $final_path/$app sudo -u "$app" MIX_ENV=prod mix ecto.migrate popd +ynh_secure_remove --file="$final_path/.cache" + #================================================= # RUN APP MIGRATIONS #================================================= @@ -264,8 +269,6 @@ ynh_store_file_checksum --file="$config" chmod 400 "$config" chown $app:$app "$config" -ynh_secure_remove --file="$final_path/.cache" - #================================================= # SETUP SYSTEMD #=================================================