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:
parent
789cd9aaac
commit
6ecce03d3e
3 changed files with 13 additions and 13 deletions
|
@ -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
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue