Booty has the correct approach for our project such that any repo can use it and:
Run locally or in github actions with no differences
Can be linked to from any other repo using standard paths. No weird github secrets needed.
Booty uses make file, and make files are nice and easy but we can convert this to mage files in order to build a highly reusable build, gen and deployment tool where you get compile time errors.
Mage can run as an interpreter just like make can BTW. So we DONT need to release booty. Repos just link to it in their go.mod, like with any golang code.
NOTE: We should do this work in booty repo and ensure that the CI keeps working as we develop it.
Booty has an example golang proj, and booty-test repo also has an example. Booty-test ensures that dependencies are still working from booty. SO you can keep making sure things are working in boot and booty-test repo as you extend mage code.
Eventually we replace all of the makefile with golang / mage is the intent.
NOTE: the main thing is to follow the approach booty takes. It took a while to work out this approach to CI that works for all our needs.
Bits to convert:
In booty we have gitr.mk. We need to get that "maged"...
In shared, we have the common bs-* stuff we also need installed as part of the Dep cycle. That can simple be copied to booty, and installed from there i think. This is golang
After that its quite easy i think. We already have a good makefile approach where the CI just calls "make all", and the makefile root takes over. Soyou just need to copy this pattern with mage i think.
Booty has the correct approach for our project such that any repo can use it and:
Booty uses make file, and make files are nice and easy but we can convert this to mage files in order to build a highly reusable build, gen and deployment tool where you get compile time errors. Mage can run as an interpreter just like make can BTW. So we DONT need to release booty. Repos just link to it in their go.mod, like with any golang code.
NOTE: We should do this work in booty repo and ensure that the CI keeps working as we develop it. Booty has an example golang proj, and booty-test repo also has an example. Booty-test ensures that dependencies are still working from booty. SO you can keep making sure things are working in boot and booty-test repo as you extend mage code.
Eventually we replace all of the makefile with golang / mage is the intent.
Here is mage: https://github.com/magefile/mage
SO in each Repo root, instead of a root makefile, you have a root magefile.go
I would start with a good base of what others have done to make mage work for them.
Here are tons of example of using mage: https://github.com/search?l=Go&o=desc&q=github.com%2Fmagefile%2Fmage&s=indexed&type=Code
Panther looks decent. https://github.com/panther-labs/panther/blob/master/magefile.go
not bad... https://github.com/trnlink/ls/blob/v3.10/tools/mage/git.go
NOTE: the main thing is to follow the approach booty takes. It took a while to work out this approach to CI that works for all our needs.
Bits to convert: