What are some small build automation tools?

I’m finding myself writing bespoke, fragile little scripts to automate building, deploying, or processing small things. It would be very nice to replace them with a more robust, generalised tool that isn’t make. I’ve written a relatively generic build & deploy automation tool before, but left it behind at the company I was working for.

This has me wondering: do you know of some small build automation tools that are straightforward to configure in terms of dependencies (some tasks/targets depending on other ones, or their outputs), and executing arbitrary commands?

I’m basically looking for modern, simpler alternatives to make, not tied to any particular language, toolchain, or framework. I know I’ve seen a couple out there in passing, but I don’t remember their names.

I don’t know too much about build systems, but I quite like Shake. I use it as the build system for my static website. However, it is written in Haskell so people might find it intimidating. If you want to use it, I would be more than happy to assist! ^^

The person who made Shake is now working on Buck2, which I have not tried. However, it does purportedly fix some issues that Shake has and is geared more towards larger projects.

Also – Help is for stack-overflow-style questions. If there isn’t a specific answer and it is instead more of a discussion, I think this should be in General.

1 Like

Thanks for the suggestions! Taking a look at Shake and Buck2, they both seem more complicated than what I’m after. Buck2 in particular, in a Rust context for example, appears to be a replacement for Cargo, whereas I’m looking for something that could simply invoke Cargo (or any other program) in some series of steps.

For example, let’s say I have a static site built with some ssg, and a web game made in Godot that gets embedded in that site. A hypothetical full build-and-deploy task could be configured like this:

deploy
  deps: [
    deploy_clean,
    godot_export_full,
    site_build_full,
  ]
  workdir: "target/deploy/",
  exec: [
    "mkdir site",
    "cp -R {root}/site/output ./site",
    "mkdir site/game",
    "cp -R {root}/godot_game/build/web ./site/game",
    "rsync -rhlt --info='all1,progress0,stats0' --delete-after --delete-excluded --force --prune-empty-dirs ./site/ /srv/site/",
  ]

I’m of course not set on the format, this is just pseudocode.

If it’s just a series of simple steps, I would probably write it in bash or some other scripting language.

I still think Shake is a good choice for you, because you can invoke programs on the command line and define dependencies.

Yeah, for a small series of steps that don’t have much logic in them, you’ll really struggle to find something better than bash scripts with a potential make overlay for common operations.

I’ve seen people use Just as a simpler, less quirky make alternative GitHub - casey/just: 🤖 Just a command runner

Haven’t used it yet myself but it does seem temptingly simple

1 Like

Thank you for sharing this! I’ve just had a deeper look at it and it does seem quite nice for at least some potential use cases I have in mind.

That said, I don’t really like the fact that it relies on a shell, and is packed with shortcut features (the need for which mostly arises from the fact that it relies on a shell), while missing other things, like reusing logic via functions, or caching recipe results.

I think I’ll give just a try, as well as attempt writing my own thing, and see which path I like better.