Installation's update

Re: Installation's update

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

One can use git pull with addons *only if* ... *only if* ... the addon code was acquired via git repos for those addons.  Look for a hidden .git directory in those plugin directories.   If not there, plugin was not installed using git.

Other wise a git pull at code root of the moodle acquires *only* ... *only* ... core code.

To update the plugins either use Admin GUI interface for upgrading plugins via Moodle plugins server or manually acquire the zip files for the plugins and upgrade manually.

See: https://docs.moodle.org/311/en/Installing_plugins

'SoS', Ken

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

Re: Installation's update

by Roberto Catanuto -
Yes, the addons were installed via git. If I'm correct,
$ git fetch
$ git pull

would be enough.

For the core code, may you please let me know the git option to update from 3.9.3 to 3.9.7?

Thank you
In reply to Roberto Catanuto

Re: Installation's update

by Ken Task -
Picture of Particularly helpful Moodlers

@root of core code where one can see the hidden .git directory to update within a series ... like your 3.9.3 to what ever is the highest subversion (3.9.7) all that I have ever used is a 'git pull'.

@root of core code what do:

git branch -a

and

fgrep '$release' version.php

ls -l config.php version.php

show?

Plus ... to get from 3.5.x to 3.9.x what were the git commands you issued?

If part of a script, please share that part of your script here in text.

'SoS', Ken

In reply to Ken Task

Re: Installation's update

by Roberto Catanuto -
grep '$release' version.php
$release = '3.9.3+ (Build: 20201211)'; // Human-friendly version name

ls -l config.php version.php
-rw-r--r--. 1 testlmseveres479ch testlmseveres479ch 1019 Dec 14 2020 config.php
-rw-r--r--. 1 testlmseveres479ch testlmseveres479ch 1639 Dec 14 2020 version.php

the command issued to get from 3.5 to 3.9 were (in the core folder)
git fetch
git branch -a
git checkout MOODLE_39_STABLE

and it all went fine.
They were issued one at a time, no script used.
In reply to Roberto Catanuto

Re: Installation's update

by Ken Task -
Picture of Particularly helpful Moodlers

What was *'d (at the top of output) when issuing git branch -a

https://docs.moodle.org/311/en/Git_for_Administrators

Section Obtaining the code from Git
Shows a command before the checkout command (change version numbers when you issue since you are @ 3.9.x:

git branch --track MOODLE_311_STABLE origin/MOODLE_311_STABLE

Also see:
Updating your installation

See by response this is a test installation so the following won't hurt (one can always use a side load method to get the .git directory and hidden .gitx files back into current code directory).

Go into code root and re-issue:

git branch --track MOODLE_39_STABLE origin/MOODLE_39_STABLE

git checkout MOODLE_39_STABLE

Then ...

git reset --hard

Try the git pull again.

Then php admin/cli/upgrade.php

We're trying to bring site up to the highest of 3.9.x

3.9.7+ (Build: 20210511)

Before going any higher.

'SoS', Ken

Average of ratings: Useful (1)