-
Notifications
You must be signed in to change notification settings - Fork 585
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
Target Alias #1052
Comments
Target "up" (fun _ -> "up" ==> "UpdateNugetPackages" |> Run) I don't think that's a good idea since it will mess with FAKE's internal target managment stuff. Better:
for the second case:
|
Thanks. The problem for me is that I don't want LAST_THING to always be dependent on SOMETHINGELSE or ENV. Is there a way of dealing with that? I use the wrapper to prevent the chains from firing every time, and set up dynamic build chains for various calls. It has worked well so far, but I appreciate that it's unsupported. In my case, there are no target chains except those set up in the aliases. (actually, that's not quite true, but they are very small chains, and only a couple of them) I've had a rumage around the code, and have an idea for the alias. If there's no current way to support the requirement for the dependency chain to be transient in the way I describe above, I'll see if I can implement something and supply a pull request. |
Maybe you can use =?> which allows you to have conditional dependencies.
|
possible, I hadn't thought of that, because I already have conditional dependencies depending on my context (alias). That could get quite complicated quite quickly. I've managed to make some changes. I'll commit and give you a pull request. look it over and if it's suitable, then good. If not, no problem, I'm sure I can just keep my fork in sync with master and use the changes as they stand for my work. |
Is there a way to alias a target in Fake?
For instance,
- I have a target called "UpdateNugetPackages", and I'd like to call it as "up"
- I have a set of targets that I'd like to alias as 1 call. "ENV"==> "SOMETHINGELSE" ==> "LAST_THING" aliased as "doit"
for both these scenarios at present I use another target, set the build chain in there and pipe thru run. i.e.
Target "up" (fun _ -> "up" ==> "UpdateNugetPackages" |> Run)
It's not really an issue, but this method means I get 2 build summaries, 1 for the inside build chain, and then 1 for the alias. It just looks a bit weird, and the alias thing kind of makes sense.
Thoughts?
The text was updated successfully, but these errors were encountered: