18 releases (breaking)
✓ Uses Rust 2018 edition
|new 0.13.0||Jun 1, 2020|
|0.11.0||May 28, 2020|
#9 in Build Utils
176 downloads per month
Make your build flow incremental
Non-trivial software projects usually combine multiple technologies, each coming with their specific build tool. The development workflows on such projects (e.g. checking code validity, deploying a new version) involve multiple commands that need to be executed in a coordinated way.
Running these commands manually is prone to errors, as it is easy to forget commands or to run them in the wrong order. On the other hand, using a simple script running all of them systematically is unnecessarily slow.
Žinoma provides a simple command line to execute your most common build flows in the most efficient way.
In particular, Žinoma provides a mechanism to run the tasks incrementally. This means Žinoma will avoid running repetitive tasks again and again if it determines they can be skipped.
It also handles dependencies between tasks (waiting for the completion of one task before starting another one), and runs tasks in parallel whenever possible.
Finally, Žinoma offers a watch mode, which waits for filesystem updates and re-executes the relevant tasks when source files are updated.
brew install fbecart/tap/zinoma
Download the relevant .deb file from the releases page. Then, run:
dpkg -i zinoma_*.deb
cargo install zinoma
In order to use Žinoma with your project, you need to create a Yaml file named
The full documentation of the expected schema can be found on this page.
USAGE: zinoma [FLAGS] [OPTIONS] [--] [TARGETS]... ARGS: <TARGETS>... Targets to build FLAGS: --clean Start by cleaning the target outputs -h, --help Prints help information -V, --version Prints version information -w, --watch Enable watch mode: rebuild targets and restart services on file system changes OPTIONS: -p, --project <PROJECT_DIR> Directory of the project to build (in which 'zinoma.yml' is located) -v <verbosity>... Increases message verbosity
The incremental build is the core feature of Žinoma. It is meant to accelerate considerably your development environment, while simplifying the execution of your most common build flows.
The best way to speed up your build flow is simply to avoid running its commands. Žinoma helps you do this in a fully automated way.
Targets operate on the file system, transforming some files (aka inputs) into other files (aka outputs).
By looking at the files located in the
output_paths of your targets,
Žinoma can tell if a target needs to run again, or can be skipped.
Žinoma compares files by computing their checksum.
These checksums are stored in the
.zinoma directory, located next to
This directory should be ignored in your version control.
Žinoma offers a watch mode which can be enabled with the
--watch option of the command line.
If the watch mode is enabled,
zinoma will not exit after the build flow completion.
Instead, it will keep an eye open on the targets'
input_paths and will re-execute the relevant targets in case filesystem changes are detected.
This flag helps you clean up your build environment.
It will delete files specified in your
targets.<target_name>.output_paths and will reinitialize the targets incremental states.
If provided alone, the
--clean flag will clean up all targets of your build flow.
When provided along with targets, the
--clean flag will only run the cleanup on the specified targets and their dependencies.
zinoma will then proceed to the execution of these targets.
targets: download_dependencies: input_paths: [ package.json, package-lock.json ] output_paths: [ node_modules ] build: npm install test: dependencies: [ download_dependencies ] input_paths: [ package.json, node_modules, src, test ] build: npm test lint: dependencies: [ download_dependencies ] input_paths: [ package.json, node_modules, src, test ] build: npm run lint check: dependencies: [ test, lint ] start: dependencies: [ download_dependencies ] input_paths: [ package.json, src ] service: exec npm run start build: dependencies: [ check ] input_paths: - Dockerfile - package.json - package-lock.json - src output_paths: [ lambda.zip ] build: | docker build -t build-my-project:latest . docker create -ti --name build-my-project build-my-project:latest bash docker cp build-my-project:/var/task/lambda.zip ./ docker rm -f build-my-project
Some example of commands:
zinoma checkwill ensure the code complies to the test suites and the coding standards.
zinoma start --watchwill run the application and restart it whenever the sources are updated.
zinoma --clean buildwill generate a clean artifact, ready to be deployed.
A fully functional and more advanced example project is available in fbecart/zinoma-node-example.
Žinoma is written in Rust, so you'll need to grab a Rust installation in order to compile it.
To build Žinoma:
$ git clone email@example.com:fbecart/zinoma.git $ cd zinoma $ cargo build --release $ ./target/release/zinoma --version Žinoma 0.5.1
To run the test suite, use:
Žinoma is a Lithuanian word. Pronounced it with a stress on the first syllable, which should sound like the gi of regime.
In Lithuanian, žinoma has two meanings:
- of course, when used as an adverb;
- known, when used as an adjective (a reference to the Not Invented Here Syndrome).
It is also a recursive acronym for "Žinoma Is NOt MAke!".
This project started as a fork of Steve Mostovoy's buildy.
Žinoma is distributed under the terms of the MIT license.
See LICENSE for details.