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

[FEATURE] add dynamic destionation paths to config #114

Closed
nydragon opened this issue Feb 12, 2023 · 2 comments
Closed

[FEATURE] add dynamic destionation paths to config #114

nydragon opened this issue Feb 12, 2023 · 2 comments

Comments

@nydragon
Copy link

Is your feature request related to a problem? Please describe.
I have started using this project yesterday and found myself confronted with the lack of support for dynamic paths.
By that I mean that every destination for a file is static and will not change.

Describe the solution you'd like
Allow path expansions, shell style:

"firefox/cookie_cache"="~/.mozilla/firefox/**.default-release/permissions.sqlite"

** being in this case gibberish that is firefox version dependent, at least I assume.
And the deploy could fail if the expansion is ambiguous.

I wasn't able to find any crate that already does this for you,

Describe alternatives you've considered
Alternatively it would be a possibility to add string interpolation to the .toml files and allow shell script evaluation.

"firefox/cookie_cache"="{{ find ~/.mozilla/firefox/ -name \"permissions.sqlite\"  }}"
@SuperCuber
Copy link
Owner

This is very similar to #61 , and would be covered by it.
Sadly I don't have much bandwidth to work on the project nowadays, so a PR implementing this would be greatly appreciated.

For your use case, you can run a pre-deploy script with something like

rm -f ~/.mozilla/firefox/actual-default-release
ln -s ~/.mozilla/firefox/*.default-release ~/.mozilla/firefox/actual-default-release

then deploy into actual-default-release folder.

Add protection against zero or multiple matches as you see fit :)

@nydragon
Copy link
Author

Alright, thank you a lot for your feedback!

I will start looking at the code and how to implement the feature mentioned in #61 and this issue.
However it will take some time as I do not have a lot of experience in Rust and I don't have an
enormous bandwidth either. But I suppose there isn't much urgency.

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

No branches or pull requests

2 participants