Upgrading Moodle to specific new minor version using git?

Re: Upgrading Moodle to specific new minor version using git?

by Ken Task -
Number of replies: 3
Picture of Particularly helpful Moodlers

+ means there have been additions to release ... not enough to be considered a point release ... like 3.5.*thisnumberhere*.  Normally one sees '+''s after a .0 release the very next week of the initial .0 release.  And very minor update when code is 3.5.2 and a minor update was available, then version would appear as 3.5.2+

Moodle releases code each week.  In the case of 3.5 LTS no more code fixes for errors, only security updates.

If both servers were installed with -b ... then they both would have to use the same git checkout -b ... blah command.   Thus would be getting exactly the same updates - no matter when one runs that command on both ... same day, same week or different day, different week.

Command has nothing to do with the date/day you run it but command would/might get updated secure code.  Isn't that what you want?

If you get the same results as I showed, then it was successful!   And to verify, the 'fgrep '$release' version.php check showed the code is highest available 3.5.x.

If the updated code has been acquired, then the database has to be 'informed' ... thus php admin/cli/ script to update is run.

There is one way to find out if it works for you or not ... on test site, backup what you have.  Be sure to include moodle version number and date/time stamp in filenames of those backups. Then do it!

'SoS', Ken



In reply to Ken Task

Re: Upgrading Moodle to specific new minor version using git?

by David M -
Hmm, updating my test site did the following (which is not quite what I expected):

root@temple:/var/www/html/temple421# git checkout -b MOODLE_35_STABLE origin/MOODLE_35_STABLE
Previous HEAD position was 46574904af... Moodle release 3.5
Branch MOODLE_35_STABLE set up to track remote branch MOODLE_35_STABLE from origin.
Switched to a new branch 'MOODLE_35_STABLE'
root@temple:/var/www/html/temple421# grep '$release' version.php
$release  = '3.5.1+ (Build: 20180803)'; // Human-friendly version name

I was expecting the site to update to version 3.5.7+ ?

In reply to David M

Re: Upgrading Moodle to specific new minor version using git?

by Ken Task -
Picture of Particularly helpful Moodlers

Do a git pull by itself now that a branch has been set.

Then check: fgrep '$release' version.php

hopefully: $release  = '3.5.7+ (Build: 20190712)

Then upgrade via admin/cli/ scripts.

'SoS', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Upgrading Moodle to specific new minor version using git?

by David M -
Many thanks, Ken. That seems to have worked successfully now.