1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/calckey_ynh.git synced 2024-09-03 18:16:18 +02:00

Merge pull request #14 from oufmilo/master

Upgrade v13.1
This commit is contained in:
oufmilo 2023-02-04 01:11:40 +01:00 committed by GitHub
commit 8bf95c55be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 17 deletions

View file

@ -11,7 +11,8 @@
setup_private=1
setup_public=1
upgrade=1
# upgrade=1 from_commit=CommitHash
# v13.0.5
upgrade=1 from_commit=89f4f52e3cb3c9daf8eff43aab67bcda475da410
backup_restore=1
multi_instance=0
change_url=0

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://codeberg.org/calckey/calckey/archive/v13.0.5.tar.gz
SOURCE_SUM=97A19C8F4E58E3DFB7085A0ACA0D48540A5B39E3FABEC3A623AAD866DE634C74
SOURCE_URL=https://codeberg.org/calckey/calckey/archive/13.1.tar.gz
SOURCE_SUM=A7E6F45209AB1E38BB1831427551FA8F04B00121614DB7D550F62F99255ADC33
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -74,8 +74,6 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
#=================================================
# CREATE DEDICATED USER
#=================================================
@ -130,17 +128,15 @@ ynh_add_config --template="../conf/default.yml" --destination="$final_path/.conf
#=================================================
# BUILD APP
#=================================================
ynh_script_progression --message="Building app..." --weight=15
ynh_script_progression --message="Building app..." --weight=20
pushd "$final_path"
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run clean-all
corepack enable
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn set version berry
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn plugin import workspace-tools
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 yarn run rebuild
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run migrate
corepack prepare pnpm@latest --activate
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm i
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm run build
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm run init
popd
#=================================================

View file

@ -73,7 +73,19 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=5
# Define and install dependencies
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
#=================================================
# REINSTALL PNPM
#=================================================
ynh_script_progression --message="Reinstalling pnpm..." --weight=1
# Define and install pnpm
pushd "$final_path"
ynh_use_nodejs
corepack enable
corepack prepare pnpm@latest --activate
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install
popd
#=================================================
# RESTORE THE NGINX CONFIGURATION

View file

@ -120,7 +120,6 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=5
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
#=================================================
# NGINX CONFIGURATION
@ -137,9 +136,11 @@ ynh_script_progression --message="Building app..."
pushd "$final_path"
ynh_use_nodejs
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 yarn run rebuild
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run migrate
corepack enable
corepack prepare pnpm@latest --activate
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm install
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm run build
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm migrate
popd
#=================================================