Citoid/Updating Zotero
< Citoid
If you are not yet a registered user of gerrit, see Developer account.
Updating Zotero translators
edit- Check out our translator fork at https://gitlab.wikimedia.org/repos/mediawiki/services/zotero-translators
- (First time only)
git remote add upstream https://github.com/zotero/translators.git
git fetch upstream
git checkout -b upstream upstream/master
- Point your repository to the gitlab main
git checkout main
- Create a new branch for your changes
git checkout -b work/user/update
- Merge changes from the github branch to our 'update' one:
git merge upstream
- 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.
- You should resolve this conflict by doing
git rm Open\ WorldCat.js
- You may see a message like
- Commit the squashed changes:
git commit
- 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- Clone the gitlab repository using authenticated checkout
git clone --recursive git@gitlab.wikimedia.org:repos/mediawiki/services/zotero.git
- Create a local branch of the github repository as well we'll call
github
from https://github.com/zotero/translation-servergit add remote github https://github.com/zotero/translation-server.git
git fetch github
git checkout -b github github/master</branch>
- Point your repository to the gitlab main
git checkout main
- Create a new branch for your changes
git checkout -b work/user/update
- Rebase from the github branch to our 'update' one:
git rebase github
- 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
- If you are updating our translator fork as well:
- Change directories to modules/translators, check out our translator fork at https://gitlab.wikimedia.org/repos/mediawiki/services/zotero-translators
- Change directories back to your zotero directory and
git add modules/translators/
so it points to the correct submodule path.
- Commit the squashed changes:
git commit
- Push your branch to gitlab:
git push origin work/user/update
- Open up a pull request.