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

Merge pull request #69 from YunoHost-Apps/testing

Testing
This commit is contained in:
eric_G 2024-05-16 13:26:01 +02:00 committed by GitHub
commit 1eca8cb798
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 35 deletions

View file

@ -97,6 +97,12 @@ ram.runtime = "50M"
autoupdate.upstream = "https://codeberg.org/mineclonia/mineclonia" autoupdate.upstream = "https://codeberg.org/mineclonia/mineclonia"
autoupdate.strategy = "latest_forgejo_release" autoupdate.strategy = "latest_forgejo_release"
[resources.sources.mineclone2]
url = "https://git.minetest.land/VoxeLibre/VoxeLibre/archive/0.86.2.tar.gz"
sha256 = "97536a9e36482363112185ab936532d034163e3dc1ebd3cb365d018fc14b810d"
autoupdate.upstream = "https://git.minetest.land/VoxeLibre/VoxeLibre"
autoupdate.strategy = "latest_forgejo_release"
[resources.system_user] [resources.system_user]
[resources.install_dir] [resources.install_dir]

View file

@ -24,17 +24,7 @@ chown -R $app:$app "$install_dir"
#================================================= #=================================================
ynh_script_progression --message="Building Minetest..." ynh_script_progression --message="Building Minetest..."
# Install the game ynh_setup_source --dest_dir=$install_dir/games/$game --source_id=$game
if [ $game = "capturetheflag" ]; then
# Download Capture The Flag
ynh_setup_source --dest_dir=$install_dir/games/capturetheflag --source_id=capturetheflag
elif [ $game = "mineclonia" ]; then
# Download Mineclonia
ynh_setup_source --dest_dir=$install_dir/games/mineclonia --source_id=mineclonia
else
# Download Minetest Game
ynh_setup_source --dest_dir=$install_dir/games/minetest_game --source_id=minetest_game
fi
# Install IrrlichtMt # Install IrrlichtMt
ynh_setup_source --dest_dir=$install_dir/lib/irrlichtmt --source_id=irrlichtmt ynh_setup_source --dest_dir=$install_dir/lib/irrlichtmt --source_id=irrlichtmt

View file

@ -9,12 +9,6 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# STANDARD UPGRADE STEPS # STANDARD UPGRADE STEPS
#================================================= #=================================================
@ -22,7 +16,7 @@ upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..." ynh_script_progression --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app --action="stop" ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
#================================================= #=================================================
# ENSURE DOWNWARD COMPATIBILITY # ENSURE DOWNWARD COMPATIBILITY
@ -38,14 +32,10 @@ fi
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..." --weight=1
if [ "$upgrade_type" == "UPGRADE_APP" ] # Download, check integrity, uncompress and patch the source from app.src
then ynh_setup_source --dest_dir="$install_dir" --full_replace=1
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --full_replace=1
fi
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir" chown -R $app:$app "$install_dir"
@ -58,16 +48,7 @@ chown -R $app:$app "$install_dir"
ynh_script_progression --message="Building Minetest..." ynh_script_progression --message="Building Minetest..."
# Install the game # Install the game
if [ $game = "capturetheflag" ]; then ynh_setup_source --dest_dir=$install_dir/games/$game --source_id=$game
# Download Capture The Flag
ynh_setup_source --dest_dir=$install_dir/games/capturetheflag --source_id=capturetheflag
elif [ $game = "mineclonia" ]; then
# Download Mineclonia
ynh_setup_source --dest_dir=$install_dir/games/mineclonia --source_id=mineclonia
else
# Download Minetest Game
ynh_setup_source --dest_dir=$install_dir/games/minetest_game --source_id=minetest_game
fi
# Install IrrlichtMt # Install IrrlichtMt
ynh_setup_source --dest_dir=$install_dir/lib/irrlichtmt --source_id=irrlichtmt ynh_setup_source --dest_dir=$install_dir/lib/irrlichtmt --source_id=irrlichtmt

View file

@ -33,3 +33,9 @@ test_format = 1.0
only = ["install.root", "backup_restore", "upgrade"] only = ["install.root", "backup_restore", "upgrade"]
args.game = "mineclonia" args.game = "mineclonia"
["Test-mineclone2"]
only = ["install.root", "backup_restore", "upgrade"]
args.game = "mineclone2"