Jump to content

Citoid/Updating Zotero

From mediawiki.org

If you are not yet a registered user of gerrit, see Developer account.


Updating Zotero translators

[edit]
  1. Check out our translator fork at https://gitlab.wikimedia.org/repos/mediawiki/services/zotero-translators
  2. (First time only)
    1. git remote add upstream https://github.com/zotero/translators.git
    2. git fetch upstream
    3. git checkout -b upstream upstream/master
  3. Point your repository to the gitlab main git checkout main
  4. Create a new branch for your changes git checkout -b work/user/update
  5. Merge changes from the github branch to our 'update' one: git merge upstream
    1. You may see a message like CONFLICT (modify/delete): Open WorldCat.js deleted in HEAD and modified in upstream. Version upstream of Open WorldCat.js left in tree.
    2. You should resolve this conflict by doing git rm Open\ WorldCat.js
  6. Commit the squashed changes: git commit
  7. Push upstream if you have developer access: git push origin work/user/update. Alternatively push to your fork (see: mw:GitLab/Workflows/Making_a_merge_request)

Our translator fork is largely the same except that we have deleted the WorldCat translator, so it's important this stays deleted in the merge.


Once the translators have been updated, you will need to also update translation-server to point to the correct version by updating the submodule.

Updating Zotero (translation-server)

[edit]
  1. Clone the gitlab repository using authenticated checkout git clone --recursive [email protected]:repos/mediawiki/services/zotero.git
  2. Create a local branch of the github repository as well we'll call github from https://github.com/zotero/translation-server
    1. git add remote github https://github.com/zotero/translation-server.git
    2. git fetch github
    3. git checkout -b github github/master</branch>
  3. Point your repository to the gitlab main git checkout main
  4. Create a new branch for your changes git checkout -b work/user/update
  5. Rebase from the github branch to our 'update' one: git rebase github
  6. Resolve conflicts; there are some dockerfiles in the github repo that need to be removed as they conflict with our production environment. Otherwise, new changes can be merged in, as long as they pass automated tests and integration testing with citoid. git rm -f Dockerfile .dockerignore docker-entrypoint.sh
  7. If you are updating our translator fork as well:
    1. Change directories to modules/translators, check out our translator fork at https://gitlab.wikimedia.org/repos/mediawiki/services/zotero-translators
    2. Change directories back to your zotero directory and git add modules/translators/ so it points to the correct submodule path.
  8. Commit the squashed changes: git commit
  9. Push your branch to gitlab: git push origin work/user/update
  10. Open up a pull request.