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

Template rendering doesn't work alongside dest #297

Open
dalebradman opened this issue Feb 14, 2023 · 1 comment
Open

Template rendering doesn't work alongside dest #297

dalebradman opened this issue Feb 14, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dalebradman
Copy link

dalebradman commented Feb 14, 2023

🐞 Describe the bug

It seems as though when you want to use the Jinja templating, you cannot specify the dest keyword in the config alongside template

📚 To reproduce

Set the sync.yml file to:

project/repo_1:
  - source: folder/file.py
    dest: file.py
    template:
      name: dale

Then the file.py file will incorrectly be rendered as:

name = {{ name }}

💡 Expected behavior

I'd like to set the sync.yml file as:

project/repo_1:
  - source: folder/file.py
    dest: another_folder/file.py
    template:
      name: dale

Which will be rendered as:

name = dale

This file will live in another_folder/file.py in the destination repo. Currently, if you remove dest from the config, then it will render the output correctly, however it will sync it to the wrong path in the destination repo.

🖼️ Screenshots

No response

⚙️ Environment

v1

📋 Additional context

This does work for a non-python example:

project/repo_1:
  - source: folder/file.yml
    dest: another_folder/file.yml
    template:
      name: dale
@dalebradman dalebradman added the bug Something isn't working label Feb 14, 2023
@dalebradman
Copy link
Author

Actually, I'm not 100% sure if the Python file is related to the issue. It might be more of a case that it doesn't work well with multiple sources:

project/repo_1:
  - source: folder/file_1.yml
    dest: another_folder/file_1.yml
    template:
      name: dale
  - source: folder/file_2.yml
    template:
      name: dale

file_2.yml renders and syncs correctly but file_1.yml does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant