-
Notifications
You must be signed in to change notification settings - Fork 130
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
[Question] Conditionally run task if files have changed on set directory #611
Comments
It is a valid request, however, currently it is not supported. |
The crate I want to call is my own and in the same Rust workspace as the rest of my application, so I could in theory add the required watch logic in it directly. And yes, I wanted to see if there's a tool available that does this for me automatically, preferably something very close to Rust and Cargo. I would use the Rust's own build scripts by running the |
i wonder if something like in #436 could help? |
@kaphula did you look at that issue i mentioned? i have there duckscript script that checks if path is newer than call some cargo make task. maybe it is useful for you as well? |
Thanks for the advice, I'll keep that in mind for the future but I don't currently have time to play around with this now. I settled for a solution that is based on pure Cargo/Rust commands. You can close this issue if you want. |
I stumbled upon the same issue, I will be able to solve it via duck script I think, but I would still like something like this. I imagined like a glob that can be specified to be checked for changes. In my case it is to run |
like i explained before, it would mean cargo-make would need to know what your command does and where the output is. using globs in duckscript could make your code pretty generic and no need to maintain much logic.
|
I get what you mean by that, I just wonder if this might be an often enough usecase that I might want to say, run this, if any file in this glob is newer than any file in the other glob. e.g. any_newer= {src=["src/*.js", "static/*.html"], target=["out/*"]} |
the mapping is an issue. js might stay js and html might get converted to js. |
I didn't want anything that advanced. While that does not cover all cases, if one wants specific behavior based on a file to file mapping they probably need to use duckscript. |
i might be able to do something for that... |
Hey,
Is it possible to conditionally skip or include steps based on changes on the filesystem? I read about watch but that's not really what I am looking for, I think. I would like to able to run a separate binary crate on my workspace before compiling and running my main application IF certain directory's contents have changed since the last time
cargo make
was run.The text was updated successfully, but these errors were encountered: