1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tldraw_ynh.git synced 2024-09-03 20:35:54 +02:00

use corepack

This commit is contained in:
Salamandar 2024-07-11 22:20:57 +02:00
parent 5ac78410f7
commit 82e9f9d3df
3 changed files with 12 additions and 14 deletions

View file

@ -1,3 +1,5 @@
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
packaging_format = 2
id = "tldraw"
@ -49,9 +51,3 @@ ram.runtime = "50M"
[resources.permissions]
main.url = "/"
[resources.apt]
packages = ""
extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main"
extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg"
extras.yarn.packages = "yarn"

View file

@ -21,6 +21,7 @@ ynh_install_nodejs --nodejs_version="$NODEJS_VERSION"
ynh_script_progression --message="Setting up source files..." --weight=1
ynh_setup_source --dest_dir="$install_dir/sources"
mkdir -p "$install_dir/bin"
chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir"
@ -38,12 +39,14 @@ chown -R "$app:www-data" "$install_dir"
# BUILD YARN DEPENDENCIES
#=================================================
ynh_use_nodejs
ynh_exec_as "$app" corepack enable --install-dir "$install_dir/bin"
pushd "$install_dir/sources"
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn cache clean
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn install --network-timeout 1000000000
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn cache clean
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn build
ynh_exec_warn_less ynh_exec_as "$app" env COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_node_load_PATH" "$install_dir/bin/yarn" cache clean
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$install_dir/bin/yarn" install --network-timeout 1000000000
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$install_dir/bin/yarn" cache clean
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$install_dir/bin/yarn" build
popd
#=================================================

View file

@ -1,6 +1,5 @@
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json
test_format = 1.0
[default]
args.publickey="public"