Move to Git for automatic upgrades


(Willh) #1

I've just tried a test install of the new 4.18.0 release using Automatic Upgrades script (now apparently called MatrixUpgrades).

 

The upgrade seems to rely on Git. Specifically, the main.conf file of the script requires a location for the Git binary.

 

I can't find this discussed in the patch notes, manuals or on SquizLabs blog. It isn't in the requirements yet. There is a mention of it in the EES script. Those of us who have builds on managed servers don't necessarily have Git installed so this is a bit inconvenient.

 

Could someone from Squiz confirm that Git is a system requirement please?

 

Thanks

Will

 


(Nic Hubbard) #2

I just looked through the 4.18.0 Automatic Upgrade files and I see no reference to git. Not even in the .conf file you mentioned. 

 

Where did you see a message about needing git?


(Willh) #3

Hi Nic,

I downloaded automatic_upgrades_4-18-0.zip today. Here's part of the main.conf

<?php
  .......
        'git'           =&gt; Array(
                           'location' =&gt; 'git@gitlab.squiz.net:Labs/Matrix.git',
                            //'path' =&gt; '/usr/bin/git',
                          ),


?>

When I ran the script it gave this error:

 

MatrixUpgrades/matrix_upgrade.php: Unable to find the git binary. Please add git path to the MatrixUpgrades/conf/main.conf file


(Nic Hubbard) #4

Hi Nic,

I downloaded automatic_upgrades_4-18-0.zip today. Here's part of the main.conf

<?php
  .......
        'git'           =&gt; Array(
                           'location' =&gt; 'git@gitlab.squiz.net:Labs/Matrix.git',
                            //'path' =&gt; '/usr/bin/git',
                          ),


?>

When I ran the script it gave this error:

 

Well that is strange. I downloaded it on November 3 and it did not include the .git line in the .conf file. Just downloaded it again and I do see what you are talking about. Very strange.

 

http://gitlab.squiz.net isn't even a known host, so this must be an error that it was included.

 

Squiz, can you confirm how we should proceed?


(Chris Smith) #5

Hi,

 

If you run with '--git=disable' it will not use git but will fall back to cvs instead.

 

(I'll get the download fixed up).

 

Let us know how it goes.


(Willh) #6

I'm still getting an error:

~]$ php /[path_to_upgrade]/MatrixUpgrades/matrix_upgrade.php --git=disable /[path_to_matrix_system_root]/ mysource_4-18-0

/[path_to_upgrade]/MatrixUpgrades/matrix_upgrade.php: can’t disable CVS, git and pre-uploaded files all at the same time
usage: php /[path_to_upgrade]/MatrixUpgrades/matrix_upgrade.php [options] system_root new_version
Type “php /[path_to_upgrade]/MatrixUpgrades/matrix_upgrade.php --help” for more details.
~]$

I've tried a number of switch combinations. I've also tried it with the main.conf in original form and with the git section commented out. Can't get it to work.

 

I'm upgrading from 4.16.0


(Chris Smith) #7

Hi,

 

Can you re-download the auto-upgrade zip file? I fixed a few little issues yesterday.


(bm@iucr.org) #8

Hi,

 

Can you re-download the auto-upgrade zip file? I fixed a few little issues yesterday.

 

I ran into the same problem yesterday. I can confirm that the latest version seems to work fine for me today, upgrading a backup version from 4.14.2 to 4.18.0.

 

Many thanks

Brian


(Willh) #9

I also tried today. The fix which Chris put up seems to work for me.

 

Thanks