diff --git a/manifest.toml b/manifest.toml index f881199..2ef30ac 100644 --- a/manifest.toml +++ b/manifest.toml @@ -1,3 +1,5 @@ +#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json + packaging_format = 2 id = "dolibarr" @@ -5,7 +7,7 @@ name = "Dolibarr" description.en = "Manage the various aspects of your business or association" description.fr = "Gérez les différents aspects de votre activité pro ou associative" -version = "18.0.3~ynh1" +version = "18.0.4~ynh1" maintainers = ["mastereur"] @@ -46,6 +48,55 @@ ram.runtime = "50M" type = "user" [resources] + [resources.sources.main] + url = "https://github.com/Dolibarr/dolibarr/archive/18.0.4.tar.gz" + sha256 = "b1467797f892f72aa313f69f16d5277b481f2a7264ebe1d0ccf43311ca473684" + autoupdate.strategy = "latest_github_release" + + [resources.sources.upgrade_from_17] + url = "https://github.com/dolibarr/dolibarr/archive/18.0.1.tar.gz" + sha256 = "37bd3c8533b821c241dbb34b0e88349c1d5b43f7ffa6027f0b7970748d1f727a" + prefetch = false + + [resources.sources.upgrade_from_16] + url = "https://github.com/dolibarr/dolibarr/archive/17.0.1.tar.gz" + sha256 = "2eddd545c07eae291ad46e48ab55d3adb988d99c29a8dfaa2e2fde0a890b0ddc" + prefetch = false + + [resources.sources.upgrade_from_15] + url = "https://github.com/dolibarr/dolibarr/archive/16.0.5.tar.gz" + sha256 = "c8298342558e62b955a6f4c01fedb6a187b2e0c0b2c1681a97158ca979f9304f" + prefetch = false + + [resources.sources.upgrade_from_14] + url = "https://github.com/dolibarr/dolibarr/archive/15.0.3.tar.gz" + sha256 = "b145a38f56c44b166721d64909fb12408c6d10d08fcf74d2c00418a60201cc9d" + prefetch = false + + [resources.sources.upgrade_from_13] + url = "https://github.com/Dolibarr/dolibarr/archive/14.0.5.tar.gz" + sha256 = "31f4c934e484a9582d8867e4170f1f1acd8c41628b059370a6a449eb6e94ae75" + prefetch = false + + [resources.sources.upgrade_from_12] + url = "https://github.com/Dolibarr/dolibarr/archive/13.0.5.tar.gz" + sha256 = "08ec08dc5093d614361f273237f5aaf8d70e63d764c2fa8d7f3f68a1485156d0" + prefetch = false + + [resources.sources.upgrade_from_11] + url = "https://github.com/Dolibarr/dolibarr/archive/12.0.5.tar.gz" + sha256 = "b60b124ebcd294375f6200cc0683449e475b5dec687f8317b820fc8ec1413d21" + prefetch = false + + [resources.sources.upgrade_from_10] + url = "https://github.com/Dolibarr/dolibarr/archive/11.0.5.tar.gz" + sha256 = "6f51435a4ffe576e836bf6449d900de9a56016f09591322cb2ba47a07c97679d" + prefetch = false + + [resources.sources.upgrade_from_9] + url = "https://github.com/Dolibarr/dolibarr/archive/10.0.7.tar.gz" + sha256 = "6efc230f400a7b7152a0e4b9ba02a780f38b869b4aebd2bc28883268270ef871" + prefetch = false [resources.system_user] diff --git a/scripts/install b/scripts/install index 47b7d01..ee3c04b 100644 --- a/scripts/install +++ b/scripts/install @@ -37,20 +37,7 @@ ynh_mysql_execute_as_root --sql="ALTER DATABASE $db_name charset=utf8" #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 -# Load the last available version -source upgrade.d/upgrade.last.sh - -# Create an app.src for the last version of Dolibarr -cat > ../conf/app.src << EOF -SOURCE_URL=https://github.com/Dolibarr/dolibarr/archive/$next_version.tar.gz -SOURCE_SUM=$dolibarr_source_sha256 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.bz2 -SOURCE_IN_SUBDIR=true -EOF - # Download, check integrity, uncompress and patch the source from app.src -ynh_script_progression --message="Download source files..." --weight=10 ynh_setup_source --dest_dir="$install_dir" chmod 750 "$install_dir" diff --git a/scripts/upgrade b/scripts/upgrade index 1c8089e..3fcaa8b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,9 +74,9 @@ then current_major_version=${current_version%%.*} if [ ! -f upgrade.d/upgrade.$current_major_version.sh ]; then - source upgrade.d/upgrade.last.sh + source_id="main" else - source upgrade.d/upgrade.$current_major_version.sh + source_id="upgrade_from_$current_major_version" fi # If the current version has the same major version than the next one, @@ -91,19 +91,8 @@ then source upgrade.d/upgrade.$current_major_version.sh ynh_print_info --message="Upgrading app from $current_version to $next_version" - - # Create an app.src for this version of Dolibarr - cat > ../conf/app.src << EOF -SOURCE_URL=https://github.com/Dolibarr/dolibarr/archive/$next_version.tar.gz -SOURCE_SUM=$dolibarr_source_sha256 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.bz2 -SOURCE_IN_SUBDIR=true -EOF - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" + ynh_setup_source --source_id="$source_id" --dest_dir="$install_dir" chown -R $app: "$install_dir" diff --git a/scripts/upgrade.d/upgrade.10.sh b/scripts/upgrade.d/upgrade.10.sh deleted file mode 100644 index 4099105..0000000 --- a/scripts/upgrade.d/upgrade.10.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Target version of the Dolibarr update -next_version="11.0.5" - -# Dolibarr tarball checksum -dolibarr_source_sha256="6f51435a4ffe576e836bf6449d900de9a56016f09591322cb2ba47a07c97679d" \ No newline at end of file diff --git a/scripts/upgrade.d/upgrade.11.sh b/scripts/upgrade.d/upgrade.11.sh deleted file mode 100644 index b7d4982..0000000 --- a/scripts/upgrade.d/upgrade.11.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Target version of the Dolibarr update -next_version="12.0.5" - -# Dolibarr tarball checksum -dolibarr_source_sha256="b60b124ebcd294375f6200cc0683449e475b5dec687f8317b820fc8ec1413d21" \ No newline at end of file diff --git a/scripts/upgrade.d/upgrade.12.sh b/scripts/upgrade.d/upgrade.12.sh deleted file mode 100644 index 0dd40d7..0000000 --- a/scripts/upgrade.d/upgrade.12.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Target version of the Dolibarr update -next_version="13.0.5" - -# Dolibarr tarball checksum -dolibarr_source_sha256="08ec08dc5093d614361f273237f5aaf8d70e63d764c2fa8d7f3f68a1485156d0" \ No newline at end of file diff --git a/scripts/upgrade.d/upgrade.13.sh b/scripts/upgrade.d/upgrade.13.sh deleted file mode 100644 index 26366cd..0000000 --- a/scripts/upgrade.d/upgrade.13.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Target version of the Dolibarr update -next_version="14.0.5" - -# Dolibarr tarball checksum -dolibarr_source_sha256="31f4c934e484a9582d8867e4170f1f1acd8c41628b059370a6a449eb6e94ae75" \ No newline at end of file diff --git a/scripts/upgrade.d/upgrade.14.sh b/scripts/upgrade.d/upgrade.14.sh deleted file mode 100644 index e22383d..0000000 --- a/scripts/upgrade.d/upgrade.14.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Target version of the Dolibarr update -next_version="15.0.3" - -# Dolibarr tarball checksum -dolibarr_source_sha256="b145a38f56c44b166721d64909fb12408c6d10d08fcf74d2c00418a60201cc9d" \ No newline at end of file diff --git a/scripts/upgrade.d/upgrade.15.sh b/scripts/upgrade.d/upgrade.15.sh deleted file mode 100644 index c47eca1..0000000 --- a/scripts/upgrade.d/upgrade.15.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Target version of the Dolibarr update -next_version="16.0.5" - -# Dolibarr tarball checksum -dolibarr_source_sha256="C8298342558E62B955A6F4C01FEDB6A187B2E0C0B2C1681A97158CA979F9304F" diff --git a/scripts/upgrade.d/upgrade.16.sh b/scripts/upgrade.d/upgrade.16.sh deleted file mode 100644 index e5f638a..0000000 --- a/scripts/upgrade.d/upgrade.16.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Target version of the Dolibarr update -next_version="17.0.1" - -# Dolibarr tarball checksum -dolibarr_source_sha256="2EDDD545C07EAE291AD46E48AB55D3ADB988D99C29A8DFAA2E2FDE0A890B0DDC" \ No newline at end of file diff --git a/scripts/upgrade.d/upgrade.17.sh b/scripts/upgrade.d/upgrade.17.sh deleted file mode 100644 index 8880793..0000000 --- a/scripts/upgrade.d/upgrade.17.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Target version of the Dolibarr update -next_version="18.0.1" - -# Dolibarr tarball checksum -dolibarr_source_sha256="37bd3c8533b821c241dbb34b0e88349c1d5b43f7ffa6027f0b7970748d1f727a" diff --git a/scripts/upgrade.d/upgrade.9.sh b/scripts/upgrade.d/upgrade.9.sh deleted file mode 100644 index 0ff52ac..0000000 --- a/scripts/upgrade.d/upgrade.9.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Target version of the Dolibarr update -next_version="10.0.7" - -# Dolibarr tarball checksum -dolibarr_source_sha256="6efc230f400a7b7152a0e4b9ba02a780f38b869b4aebd2bc28883268270ef871" \ No newline at end of file diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh deleted file mode 100644 index bce2a10..0000000 --- a/scripts/upgrade.d/upgrade.last.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Target version of the Dolibarr update -next_version="18.0.4" - -# Dolibarr tarball checksum -dolibarr_source_sha256="b1467797f892f72aa313f69f16d5277b481f2a7264ebe1d0ccf43311ca473684" diff --git a/tests.toml b/tests.toml index 6d4e646..0b537a9 100644 --- a/tests.toml +++ b/tests.toml @@ -1,3 +1,5 @@ +#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json + test_format = 1.0 [default]