How to update a project created with Copier to the newer version¶
Info
This how-to guide assumes that the Copier tool has been installed as described in the how-to guide for preparing your system.
Over time, the boilerplate is updated and it is might becomes necessary to update the project as well with new changes. With copier it can be done in few simple steps.
-
Check the
CHANGELOG
file for information about what has been changed between versions. The file is stores in the root of each boilerplate repository. -
Create a local branch in the root of your project.
-
Select the git tag you want to update your project to.
- Available tags for webapp-boilerplatet
- Available tags for gcp-deploy-boilerplate
-
Go to your project's workdir and make sure there are no uncommitted files.
-
Run the update command inside you project's root directory.
copier update --defaults --trust
Question
Why do I need to use the
--trust
flag?Our copier templates include some custom code which is used to pre-populate poetry lock files, etc. The
--trust
flag is required to allowcopier
to run this custom code.The option
--defaults
indicates the copier will use the previous answers to populate the templates before applying the diff on top of your project. In some cases, additional information might be required. In this case please check the CHANGELOG for more information. -
Review changes with
git diff
, resolve conflicts, if any. Push to GitLab. -
Open a new Merge Reguest to the default branch.