mirror of
https://github.com/YunoHost-Apps/sharkey_ynh.git
synced 2024-09-03 20:16:32 +02:00
Upgrade v2024.3.3
Upgrade v2024.3.3
This commit is contained in:
commit
90dcdb8e0c
6 changed files with 14 additions and 57 deletions
|
@ -37,8 +37,8 @@ ram.runtime = "50M"
|
|||
[resources]
|
||||
|
||||
[resources.sources.main]
|
||||
url = "https://activitypub.software/TransFem-org/Sharkey/-/archive/2024.3.1/Sharkey-2024.3.1.tar.gz"
|
||||
sha256 = "b07371c6c7404e907b1d3102b051fa768f6d0d1ecc41d2894899bdfbe78369af"
|
||||
url = "https://activitypub.software/TransFem-org/Sharkey/-/archive/2024.3.3/Sharkey-2024.3.3.tar.gz"
|
||||
sha256 = "7bbe05f762d9dcc55562766c7dcde3c7cb8d3942aac5119ace8d7812da217d3f"
|
||||
|
||||
autoupdate.strategy = "latest_gitlab_tag"
|
||||
|
||||
|
|
|
@ -12,46 +12,4 @@ NODEJS_VERSION="20"
|
|||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# REDIS HELPERS
|
||||
#=================================================
|
||||
|
||||
# get the first available redis database
|
||||
#
|
||||
# usage: ynh_redis_get_free_db
|
||||
# | returns: the database number to use
|
||||
ynh_redis_get_free_db() {
|
||||
local result max db
|
||||
result="$(redis-cli INFO keyspace)"
|
||||
|
||||
# get the num
|
||||
max=$(cat /etc/redis/redis.conf | grep ^databases | grep -Eow "[0-9]+")
|
||||
|
||||
db=0
|
||||
# default Debian setting is 15 databases
|
||||
for i in $(seq 0 "$max")
|
||||
do
|
||||
if ! echo "$result" | grep -q "db$i"
|
||||
then
|
||||
db=$i
|
||||
break 1
|
||||
fi
|
||||
db=-1
|
||||
done
|
||||
|
||||
test "$db" -eq -1 && ynh_die --message="No available Redis databases..."
|
||||
|
||||
echo "$db"
|
||||
}
|
||||
|
||||
# Create a master password and set up global settings
|
||||
# Please always call this script in install and restore scripts
|
||||
#
|
||||
# usage: ynh_redis_remove_db database
|
||||
# | arg: database - the database to erase
|
||||
ynh_redis_remove_db() {
|
||||
local db=$1
|
||||
redis-cli -n "$db" flushall
|
||||
}
|
||||
#=================================================
|
|
@ -55,9 +55,9 @@ ynh_script_progression --message="Building app..." --weight=15
|
|||
|
||||
pushd "$install_dir"
|
||||
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 --frozen-lockfile
|
||||
env $ynh_node_load_PATH corepack enable
|
||||
env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@latest --activate
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack 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 run init
|
||||
popd
|
||||
|
|
|
@ -38,8 +38,8 @@ ynh_script_progression --message="Reinstalling PNPM..." --weight=1
|
|||
# Define and install pnpm
|
||||
pushd "$install_dir"
|
||||
ynh_use_nodejs
|
||||
corepack enable
|
||||
corepack prepare pnpm@latest --activate
|
||||
env $ynh_node_load_PATH corepack enable
|
||||
env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@latest --activate
|
||||
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
|
||||
popd
|
||||
|
|
|
@ -64,10 +64,11 @@ ynh_script_progression --message="Building app..."
|
|||
|
||||
pushd "$install_dir"
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm cleanall
|
||||
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
|
||||
env $ynh_node_load_PATH corepack enable
|
||||
env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@latest --activate
|
||||
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
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -10,6 +10,4 @@ test_format = 1.0
|
|||
|
||||
# -------------------------------
|
||||
# Commits to test upgrade from
|
||||
# -------------------------------
|
||||
|
||||
test_upgrade_from.ce8f3365661567ea5f23168b785a5d290a0bcf38.name = "2023.12.1"
|
||||
# -------------------------------
|
Loading…
Add table
Reference in a new issue