mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
This commit is contained in:
@@ -147,8 +147,9 @@ if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; the
|
||||
|
||||
|
||||
# Compute md5 based on install file contents, and on db prefix
|
||||
# filefunc.inc.php holds the version, so include it"
|
||||
# shellcheck disable=2046
|
||||
sum=$(md5sum $(find "${TRAVIS_BUILD_DIR}/htdocs/install" -type f) | { LC_ALL=C sort ; echo "$DB_PREFIX" ;} | md5sum)
|
||||
sum=$(md5sum $(find "${TRAVIS_BUILD_DIR}/htdocs/install" -type f ; echo "${TRAVIS_BUILD_DIR}/filefunc.inc.php" ) | md5sum)
|
||||
# shellcheck disable=2046
|
||||
cnt=$(md5sum $(find "${TRAVIS_BUILD_DIR}/htdocs/install" -type f) | wc)
|
||||
echo "MD5SUM $sum COUNT:$cnt"
|
||||
@@ -219,12 +220,39 @@ if [ "$load_cache" != "1" ] ; then
|
||||
(
|
||||
cd "${TRAVIS_BUILD_DIR}/htdocs/install" || exit 1
|
||||
|
||||
# Get the target version from the filefunc.inc.php file
|
||||
target_version=$(sed -n "s/.*define('DOL_VERSION',[[:space:]]*'\\([0-9.]*\\).*/\\1/p" ../filefunc.inc.php) ; echo $target_version
|
||||
# Default in case that failed
|
||||
target_version=${target_version:=20.0.0}
|
||||
|
||||
# Sequence of versions for upgrade process (to be completed)
|
||||
VERSIONS=("3.5.0" "3.6.0" "3.7.0" "3.8.0" "3.9.0")
|
||||
VERSIONS+=("4.0.0")
|
||||
VERSIONS+=("5.0.0" "6.0.0" "7.0.0" "8.0.0" "9.0.0")
|
||||
VERSIONS+=("10.0.0" "11.0.0" "12.0.0" "13.0.0" "14.0.0")
|
||||
VERSIONS+=("15.0.0" "16.0.0" "18.0.0" "19.0.0" "20.0.0")
|
||||
VERSIONS+=("21.0.0")
|
||||
|
||||
# Append versions up to the current dolibarr version
|
||||
last_version=${VERSIONS[-1]}
|
||||
|
||||
target_major=${target_version%%.*}
|
||||
last_major=${last_version%%.*}
|
||||
|
||||
# Add versions up to target_version
|
||||
while (( last_major < target_major )); do
|
||||
((last_major++))
|
||||
VERSIONS+=("${last_major}.0.0")
|
||||
done
|
||||
|
||||
# Add target_version if it's not already in the list
|
||||
last_version=${VERSIONS[-1]}
|
||||
if [[ "${last_version}" != "${target_version}" ]]; then
|
||||
VERSIONS+=("$target_version")
|
||||
fi
|
||||
|
||||
last_version=${VERSIONS[-1]} # Keep last_version up-to-date
|
||||
|
||||
# Proceed with the upgrade process
|
||||
pVer=${VERSIONS[0]}
|
||||
for v in "${VERSIONS[@]:1}" ; do
|
||||
LOGNAME="${TRAVIS_BUILD_DIR}/upgrade${pVer//./}${v//./}"
|
||||
|
||||
Reference in New Issue
Block a user