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

2

15

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)

Grandee answered 14/3, 2011 at 14:4 Comment(0)
C
25

Run:

invoke-psake -docs

This will list all the defined tasks.

Output columns are:

  • Name
  • Alias
  • Depends On
  • Default (true/false)
  • Description
Corporeity answered 14/3, 2011 at 17:44 Comment(2)
This doesn't include tasks that are defined in files that are pulled in with IncludeLuigiluigino
Im' using psake 4.3.2 and it includes the tasks defined in files that are IncludedXenogamy
G
3

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 :)

Gamosepalous answered 15/3, 2011 at 5:40 Comment(1)
This not exactly what I wanted, but it's bookmarked for future reference :) quite cool, thanks!Grandee

© 2022 - 2024 — McMap. All rights reserved.