1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/misskey_ynh.git synced 2024-09-03 19:46:03 +02:00

Regroup common code, cleanup after build

This commit is contained in:
Salamandar 2024-03-14 20:44:19 +01:00
parent 789cd9aaac
commit 6ecce03d3e
3 changed files with 13 additions and 13 deletions

View file

@ -10,6 +10,17 @@ NODEJS_VERSION="16.15.0"
# PERSONAL HELPERS # PERSONAL HELPERS
#================================================= #=================================================
misskey_build() {
pushd "$install_dir"
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" NODE_ENV=production yarn add ts-node webpack
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" NODE_ENV=production yarn build
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" NODE_ENV=production yarn run init
popd
ynh_secure_remove --file="$install_dir/.cache"
}
#================================================= #=================================================
# EXPERIMENTAL HELPERS # EXPERIMENTAL HELPERS
#================================================= #=================================================

View file

@ -41,12 +41,7 @@ ynh_add_config --template="default.yml" --destination="$install_dir/.config/defa
#================================================= #=================================================
ynh_script_progression --message="Building app..." --weight=15 ynh_script_progression --message="Building app..." --weight=15
pushd "$install_dir" misskey_build
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn add ts-node webpack
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" NODE_ENV=production yarn build
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn run init
popd
#================================================= #=================================================
# SYSTEM CONFIGURATION # SYSTEM CONFIGURATION

View file

@ -51,13 +51,7 @@ chown -R "$app:www-data" "$install_dir"
#================================================= #=================================================
ynh_script_progression --message="Building app..." ynh_script_progression --message="Building app..."
pushd "$install_dir" misskey_build
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn cleanall
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn install
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" NODE_ENV=production yarn build
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn migrate
popd
#================================================= #=================================================
# REAPPLY SYSTEM CONFIGURATIONS # REAPPLY SYSTEM CONFIGURATIONS