Introducing the Cake APT Module
I've just published another module for Cake: Cake.APT.Module.
You can include this module in your Cake builds to enable installing tools using the APT/apt
package manager!
If this sounds familiar to you, this module performs essentially the same function as the Cake DNF Module I introduced a little while ago, but now for the APT package manager, bringing Debian and Ubuntu users the same cool #tool
support (at least until they switch to Fedora :D )
What does it do?
The Advanced Packaging Tool (APT) package manager will be familiar to users of Debian, Ubuntu, or any of the myriad of distributions based on Debian or Ubuntu.
Much like the DNF module already available, this module allows Cake scripts to install tools using the familiar #tool
syntax (mostly used for NuGet tools), but now relying on apt-get
to install the requested package locally.
Debian, Ubuntu, Fedora or CentOS, you can now install your build dependencies quickly and easily in your Cake builds!
Where can I use it?
Obviously, this module will only install successfully on Linux distributions with apt-get
available and installed (that's the vast majority of dpkg
-based distros). Again, as with the DNF module, you'll need the module present even when running on Windows or macOS, where it will gracefully do nothing.
How do I use it?
This is all identical to the process for the DNF module
If you're using the latest bootstrapper example (always available in this repo), you can simply add a tools/Modules/packages.config file and the bootstrapper will install it for you.
Otherwise, just make sure the NuGet package is installed to your tools/Modules
folder and the module should kick in when needed.
Finally, to actually install a package, use the same #tool
directive you use for NuGet packages but this time use apt
as the source, like the below:
#tool apt:?package=mesa-utils
You can also add more parameters to control the installation:
#tool apt:?package=mesa-utils&version=8.3.0
Full documentation including examples and more information on the supported parameters is available in the online documentation.
How do I contribute?
The module is fully open-source and has been published on GitHub for anyone to contribute to. I always accept bugs, feedback, feature requests and PRs on GitHub.