Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix add v20 in script for contributors #31818

Merged

Conversation

Hystepik
Copy link
Contributor

add v20 in script dev/tools/github_commits_byversion.sh

@mdeweerd
Copy link
Contributor

mdeweerd commented Nov 14, 2024

Good but maybe you could reuse what I did in the setup script so that the script works for all versions:

# 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}

VERSIONS+=("15.0.0" "16.0.0" "18.0.0" "19.0.0" "20.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//./}"
"${PHP}" $PHP_OPT upgrade.php "$pVer" "$v" ignoredbversion > "${LOGNAME}.log"
"${PHP}" $PHP_OPT upgrade2.php "$pVer" "$v" ignoredbversion > "${LOGNAME}-2.log"
"${PHP}" $PHP_OPT step5.php "$pVer" "$v" ignoredbversion > "${LOGNAME}-3.log"
pVer="$v"
done

@eldy eldy merged commit 3cfda29 into Dolibarr:develop Nov 14, 2024
7 checks passed
@Hystepik Hystepik deleted the fix-add-v20-in-script-for-contributors branch February 12, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants