开发者

Is there a way to list all tasks in a psake build file?

开发者 https://www.devze.com 2023-02-17 04:29 出处:网络
I\'ve got a default.ps1 file with several tasks, some of which I don\'t use all too often. Instead of opening the file and grep\'ing 开发者_如何转开发for the Tasks, is there a way to list them in the

I've got a default.ps1 file with several tasks, some of which I don't use all too often.

Instead of opening the file and grep'ing 开发者_如何转开发for the Tasks, is there a way to list them in the command line? Ideally with some description attached to them (that would be set near the tasks).

I'm thinking of something similar to what rake does with -t (see here for example)


Run:

invoke-psake -docs

This will list all the defined tasks.

Output columns are:

  • Name
  • Alias
  • Depends On
  • Default (true/false)
  • Description


I tried to visualize the task dependencies.

Not exactly what you wanted, but could help you. Look at psake-contrib/debugging.psm1 (it needs DLLs from https://github.com/stej/psake-contrib/tree/master/lib). Basically you call psake the same way as usually but instead of calling psake tasks, the tasks tree is displayed.

It doesn't display all the tasks, only the tasks that you specified on command line. Could be added though :)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号