Upgrade OJS by git

Some help with git upgrade of OJS. I have ojs installed by git.

I have OJS 3.2.0.1 and want to upgrade to 3.2.0.2 but i cant reach the correct 3.2.02 branch.

Some one can helpme step by step

Inf i have to checkout the branch or hoe to beguin.

Hi @luismurillo,

The stable branch that includes 3.2.0-2 is called stable-3_2_0.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanl you.

So, i have 3.2.0.1 and want 3.2.0.2. I need to rebase? And then upgrade the database with tool?

Hi @luismurillo,

Yes, you’ll need to rebase your OJS repository (and don’t forget the submodules, they’ll need the same treatment); then run the database upgrade script. Make sure to take a good backup of everything before you start.

Regards,
Alec Smecher
Public Knowledge Project Team

Are we introducing changes requiring the upgrade script for patch releases (e.g. 3.2.0-1 to 3.2.0-2)?

Hi @ctgraham,

No, the 3.2.0-1 to 3.2.0-2 upgrade doesn’t require the upgrade script (as a matter of policy we don’t include database upgrade steps between builds) – but if you don’t run the upgrade script the OJS database will still identify itself as the older version. Running the upgrade script bumps it to the newest version. (Failing to bump the version won’t cause problems.)

Regards,
Alec Smecher
Public Knowledge Project Team

I´m really sorry for the question, but, is the first time I try ti upgrade by git.

So, If I undersatand

  1. $ git rebase --onto stable-3_2_0 stable-3_2_0 ???
  2. Then rebase submodules ??? If you can tell me how, please???
  3. Then I use the opgrade script

Thank you again

Last question… What submodules i have to upgrade. @asmecher

Hi @luismurillo,

I’d suggest doing some general reading about submodules – I’d only give you a low-fidelity rewrite of those documents. But you can use the git submodule status tool to list submodules. The rebase will include updated submodule hashes which will indicate what version of the submodule you should use. Where it’s available, the same branch should be used as for OJS (stable-3_2_0 for 3.2.0-x, for example). Not all submodules have a stable-3_2_0 branch, as we only create them when they’re necessary; in those cases the master branch is fine.

Regards,
Alec Smecher
Public Knowledge Project Team

Sorry, I have read but is difficult to me.
I received this information

git rebase --onto stable-3_2_0-2 stable-3_2_0-1
fatal: invalid upstream ‘stable-3_2_0-1’

@asmecher

Hi @luismurillo,

There are no branches named stable-3_2_0-2 or stable-3_2_0-1. For specific releases, use tags named e.g. 3_2_0-2 or 3_2_0-1. For the stable branch corresponding to 3.2.0-x releases, use stable-3_2_0. (This branch should always be stable.)

Regards,
Alec Smecher
Public Knowledge Project Team

thank I understand.

I try, but I get this

First, rewinding head to replay your work on top of it…
error: The following untracked working tree files would be overwritten by checkout:
plugins/generic/googleScholar/.gitignore
plugins/generic/googleScholar/GoogleScholarPlugin.inc.php
plugins/generic/googleScholar/LICENSE
plugins/generic/googleScholar/README.md
plugins/generic/googleScholar/index.php
plugins/generic/googleScholar/locale/ar_IQ/locale.po
plugins/generic/googleScholar/locale/cs_CZ/locale.po
plugins/generic/googleScholar/locale/da_DK/locale.po
plugins/generic/googleScholar/locale/de_DE/locale.po
plugins/generic/googleScholar/locale/en_US/locale.po
plugins/generic/googleScholar/locale/es_ES/locale.po
plugins/generic/googleScholar/locale/fa_IR/locale.po
plugins/generic/googleScholar/locale/fi_FI/locale.po
plugins/generic/googleScholar/locale/fr_CA/locale.po
plugins/generic/googleScholar/locale/hu_HU/locale.po
plugins/generic/googleScholar/locale/id_ID/locale.po
plugins/generic/googleScholar/locale/it_IT/locale.po
plugins/generic/googleScholar/locale/nb_NO/locale.po
plugins/generic/googleScholar/locale/nl_NL/locale.po
plugins/generic/googleScholar/locale/pl_PL/locale.po
plugins/generic/googleScholar/locale/pt_PT/locale.po
plugins/generic/googleScholar/locale/ru_RU/locale.po
plugins/generic/googleScholar/locale/sl_SI/locale.po
plugins/generic/googleScholar/locale/sv_SE/locale.po
plugins/generic/googleScholar/locale/tr_TR/locale.po
plugins/generic/googleScholar/locale/uk_UA/locale.po
plugins/generic/googleScholar/settings.xml
plugins/generic/googleScholar/version.xml
Please move or remove them before you switch branches.
Aborting
fatal: Could not detach HEAD

some help @asmecher

thank you a lot

sorry, I git add .

but now on rebase I have this

Changes not staged for commit:
(use “git add …” to update what will be committed)
(use “git restore …” to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: lib/pkp (modified content)
modified: plugins/generic/citationStyleLanguage (modified content)

I think this is the last @asmecher

Hi @luismurillo,

I don’t think that’s a problem – but these are more general Git questions than OJS questions and I’d suggest reading through some of the git documentation.

Regards,
Alec Smecher
Public Knowledge Project Team