Cake: Build script progress

Created on 4 Aug 2016  路  10Comments  路  Source: cake-build/cake

I'm currently building a Cake build script with interaction to teamcity and I'd like to provide progress messages. I can easily report the task name, but I am unable to find out what the progress is within the build script. Think like ("executing task 1 of 5").

Is there any way to find the progress within the build script?

All 10 comments

@Sebazzz You can certainly do this manually within the build script. i.e. given that you are writing the build script, you would know the intended order of execution, and overall how many tasks you have, however, this approach would be very time consuming, and subject to change.

I don't think we have anything in Cake that would provide this overall visibility, but I would agree that this would be a benefit.

@cake-build/team thoughts?

@Sebazzz actually, just been speaking to the guys, and we think that something might be possible. Would it be possible for you to raise this as a question on StackOverflow, and we can answer it there? The GitHub issues are really intended for bugs and feature requests. Thanks!

@Sebazzz if you could add a link to the SO question once you create it, that would be very helpful, thanks!

@Sebazzz perfect, thank you very much. By putting these types of questions on StackOverflow, hopefully more people will be able to find and use the answers.

Thanks. Sorry for the trouble, each project has its own way of doing things :)

@Sebazzz said...
Thanks. Sorry for the trouble, each project has its own way of doing things :)

Honestly, no trouble at all! Hope you are enjoying using Cake.

@Sebazzz FYI I've proposes an answer to your question on StackOverflow.

Are you open for accepting a pull request that implements this?

The changes I would make would include changing the signature of the graph builder to return an ICollection instead, and the task executer to then pass an count and current task number to the TaskSetup / TaskTearDown methods.

@Sebazzz Not wrong per se, but your suggested approach puts a solution for a very specific problem in the core library. A more general purpose approach (which would be more appropriate) would probably be to add a IReadOnlyCollection<ITaskInfo> to TaskSetup/TaskTeardown/Setup/Teardown contexts and let the implementor of the specific feature increase the number of executed tasks in the TaskTeardown method. This would allow similar problems to be solved without adding more and more parameters/properties to the contexts.

@cake-build/team, what do you think?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

patriksvensson picture patriksvensson  路  5Comments

RichardJFoster picture RichardJFoster  路  4Comments

vktr picture vktr  路  6Comments

thomaslevesque picture thomaslevesque  路  4Comments

pvwichen picture pvwichen  路  3Comments