Problem I have is, that once I run upgrade.php script from admin/cli, script warns me, that I'm upgrading to 3.6DEV version (which I dont want) and thats it is in alpha state.
Steps I took to try to upgrade my latest 3.4 version to 3.5 version:
1. mkdir /var/www/moodle_35
2. cd /var/www/moodle_35
3. git clone git://git.moodle.org/moodle.git
4. cd moodle
5. git checkout -b origin/MOODLE_35_STABLE
6. git pull origin/MOODLE_35_STABLE (or git pull origin MOODLE_35_STABLE) (or git pull origin origin/MOODLE_35_STABLE) -> yes, three different tries
7. cp -a /var/www/moodle_35/moodle/. /var/www/html/
8. sudo /usr/bin/php admin/cli/upgrade.php
And after this command, I get warning about aplha dev version of upgrade.
I have also tried following https://docs.moodle.org/34/en/Git_for_Administrators in section Obtaining the code from git and then copying the files to my "site" and running upgrade script with same result..
Upgrade just needs,
$ cd /var/www/html/moodle
$ git pull
$ /usr/bin/php admin/cli/upgrade.php
or visit your site as 'admin' and go to Notifications.
P.S. I used the neutral $ as prompt. The sudo thing may or may not be necessary, depending on your distribution. A more readable version will result if you do
$ su -
$ sudo -i
before all that.
P.S. The secret behind 3.6 is that just minutes ago 3.5 was released, making the latest 3.6dev+!!
If I do that (didnt know that with cp you also clone git, i never inited or cloned git into this dir, just copied all the files and folders from other gitted dir..) it says I need to specify with which branch to merge.
COmmand is git pull <remote> <branch>
What is remote and branch param in my case?
Ahh, got it, it was:
sudo git pull git://git.moodle.org/moodle.git MOODLE_35_STABLE
But now I'm getting hundreds of conflicts..
I was told, that I could pull into different folder and simply copy all the pulled newer files over older ones and then run upgrade script..
Note that you have fixed the branch you want to follow with a command like 'git branch --track MOODLE_XY_STABLE origin/MOODLE_XY_STABLE'.
If you want to change the branch, you issue the same command with the new XY.
To make sure that you have the correct version/release go through the content of the file "version.php" at the top level.
More insight: if I run git status in /var/www/moodle_35/moodle
On branch origin/MOODLE_35_STABLE
nothing to commit, working directory clean
Which makes me think, that files in this directory are version 3.5.
Why doesn upgrade script then recognize them as 3.6DEV?
Think you need to re-read the git pages ....
IF you use -b in the first git command, think you are restricting git to a single branch ... whatever you have pointed to supposedly. That bites when you are at say 3.4 and want to upgrade to 3.5.
Here's my git clip
git clone git://git.moodle.org/moodle.git [nameofdir]
[nameofdir] will be created ... whatever you name it ... elearn, learning, lrn, lms, whatever.
git branch -a
The branch being tracked at this point is the dev branch.
below replace the # to desired version ...
git branch --track MOODLE_3#_STABLE origin/MOODLE_3#_STABLE
git checkout MOODLE_3#_STABLE
now look at the tracking - to get 3.5 stable replace # above with 5
git branch -a
is the * on 35? if not, you did something wrong.
check the version.php file
fgrep '$release' version.php
should see the following for 34.
$release = '3.4.2+ (Build: 20180427)'; // Human-friendly version name
$release = '3.5 (Build: 20180517)'; // Human-friendly version name
'spirit of sharing', Ken
Thank you for detailed debugging.
If i run git branch -a I get following:
remotes/origin/HEAD -> origin/master
with * on the 3.5 version i guess..
with fgrep i get: $release = '3.6dev (Build: 20180521)'; // Human-friendly version name
I have tried to rebuild the git (deleting folder and redoing everything) and result is the same.
Hmm, for some unknown reason, I had to restart ubuntu for git commands to start working from a scratch..
fgrep now shows correct version, I'll try updating moodle now.
Thank you very much for you help!