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

Comments: Let them use Cake #13

Open
chestercodes opened this Issue Jun 11, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@chestercodes
Owner

chestercodes commented Jun 11, 2017

No description provided.

@nskerl

This comment has been minimized.

Show comment
Hide comment
@nskerl

nskerl Sep 16, 2017

It would be great if you could share an example project that shows how to share common cake tasks.. Especially common.csx being used across different applications. Thanks!

nskerl commented Sep 16, 2017

It would be great if you could share an example project that shows how to share common cake tasks.. Especially common.csx being used across different applications. Thanks!

@chestercodes

This comment has been minimized.

Show comment
Hide comment
@chestercodes

chestercodes Oct 1, 2017

Owner

Hi @nskerl thanks for the comment! I've added a basic repo to try and demonstrate the ideas in the blog post. https://github.com/CBurbidge/BuildLib

It's hard to generalise build tasks in a way which is better than the already set Cake aliases, so i haven't implemented much but I hope the project helps.

I've changed the structure a bit, Install.ps1 -> Init.ps1 and git.ignore is appended or created at the base project. The install.ps1 seems to being replaced by init.ps1 and after using a similar project I decided that appending the required things to the .gitignore is a better way to go.

The trick to sharing the library across projects is to create it into a nuget package and keep most of the logic in the common.csx file.
IMO it makes to keep as much stuff in there as possible. So instead of building an application version number in the build.cake file it makes more sense to have a method which retrieves it from the common code. This allows for company wide conventions to be codified without too much disruption from upgrading the packge to different version numbers.

Owner

chestercodes commented Oct 1, 2017

Hi @nskerl thanks for the comment! I've added a basic repo to try and demonstrate the ideas in the blog post. https://github.com/CBurbidge/BuildLib

It's hard to generalise build tasks in a way which is better than the already set Cake aliases, so i haven't implemented much but I hope the project helps.

I've changed the structure a bit, Install.ps1 -> Init.ps1 and git.ignore is appended or created at the base project. The install.ps1 seems to being replaced by init.ps1 and after using a similar project I decided that appending the required things to the .gitignore is a better way to go.

The trick to sharing the library across projects is to create it into a nuget package and keep most of the logic in the common.csx file.
IMO it makes to keep as much stuff in there as possible. So instead of building an application version number in the build.cake file it makes more sense to have a method which retrieves it from the common code. This allows for company wide conventions to be codified without too much disruption from upgrading the packge to different version numbers.

@nskerl

This comment has been minimized.

Show comment
Hide comment
@nskerl

nskerl Oct 4, 2017

Thanks so much! This is really helpful.

nskerl commented Oct 4, 2017

Thanks so much! This is really helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment