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

Use pnpm instead of yarn

This commit is contained in:
Salamandar 2024-03-27 14:03:19 +01:00
parent 34d122037a
commit cf046e47cb
3 changed files with 18 additions and 10 deletions

View file

@ -60,10 +60,5 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen
"postgresql" "postgresql"
] ]
[resources.apt.extras.yarn]
repo = "deb https://dl.yarnpkg.com/debian/ stable main"
key = "https://dl.yarnpkg.com/debian/pubkey.gpg"
packages = ["yarn"]
[resources.database] [resources.database]
type = "postgresql" type = "postgresql"

View file

@ -4,7 +4,7 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
NODEJS_VERSION="16.15.0" NODEJS_VERSION="20"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS
@ -13,9 +13,22 @@ NODEJS_VERSION="16.15.0"
misskey_build() { misskey_build() {
pushd "$install_dir" pushd "$install_dir"
ynh_use_nodejs ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" NODE_ENV=production yarn add ts-node webpack corepack enable
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" pnpm install --frozen-lockfile
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" NODE_ENV=production yarn run init ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" NODE_ENV=production pnpm build
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" pnpm run init
popd
ynh_secure_remove --file="$install_dir/.cache"
}
misskey_upgrade() {
pushd "$install_dir"
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" pnpm clean-all
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
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" pnpm migrate
popd popd
ynh_secure_remove --file="$install_dir/.cache" ynh_secure_remove --file="$install_dir/.cache"

View file

@ -51,7 +51,7 @@ chown -R "$app:www-data" "$install_dir"
#================================================= #=================================================
ynh_script_progression --message="Building app..." ynh_script_progression --message="Building app..."
misskey_build misskey_upgrade
#================================================= #=================================================
# REAPPLY SYSTEM CONFIGURATIONS # REAPPLY SYSTEM CONFIGURATIONS