Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] Older versions compatibility. #496

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

josep-tecnativa
Copy link
Contributor

@josep-tecnativa josep-tecnativa commented Oct 18, 2024

Since this changes f4bc534 pre-commit for odoo < 13 were not really supported.

  • Test template on v10
  • Test template on v15
  • Test template on v16

In order to test template from PR, we can run:
copier copy --vcs-ref add-odoo-lt13-pre-commit-comp --trust gh:Tecnativa/doodba-copier-template .

@josep-tecnativa josep-tecnativa force-pushed the add-odoo-lt13-pre-commit-comp branch 30 times, most recently from 28fc8f7 to 49ed373 Compare October 18, 2024 11:54
@josep-tecnativa josep-tecnativa force-pushed the add-odoo-lt13-pre-commit-comp branch 8 times, most recently from 5046a93 to 017ef0e Compare October 18, 2024 13:06
@@ -69,47 +104,49 @@ repos:
- id: ruff-format
{% else -%}
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 20.8b1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why changing this and the others in the file? Isn't better to create a new file for those needing these versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed those versions, adapting them to ones that are compatible with Odoo versions lower than 13.0.

Regarding your suggestion to use different files, this is not possible because the project already has a pre-commit-config.yaml to manage the hooks for the doodba-copier-template. If we have a single pre-commit-config.yaml.jinja file, when the scaffolding is generated, it overwrites the pre-commit-config.yaml. However, if I create files like {% if odoo_version >= 13 %}pre-commit-config.yaml{% endif %}.jinja, as you mentioned, we end up with the pre-commit-config.yaml from the doodba-copier-template, which is not what we want.

@josep-tecnativa josep-tecnativa force-pushed the add-odoo-lt13-pre-commit-comp branch 13 times, most recently from 6eb0063 to c77a81b Compare October 21, 2024 11:37
@josep-tecnativa josep-tecnativa force-pushed the add-odoo-lt13-pre-commit-comp branch from c77a81b to e38f0f8 Compare October 21, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants