Comake enables containerization for builds. Containerization for runtime is a good idea, it should be same for buildtime too.
Given hello-build.yml as follows:
steps:
- name: greeting
image: docker.io/library/alpine
script:
- echo "starting to greet everyone"
- sh -c 'mkdir -p build'
- sh -c 'echo "hello world" > build/hello'comake -f hello-build.yml runSimply download the latest binary for your operation system from the releases page.
For better accesibility make sure the binary's location in the PATH
For example, /usr/local/bin would work for Linux and MacOS.
| Command | Description |
|---|---|
| list | List available steps |
| run | Execute build steps as described in the build file |
| help | Help about any command |
All build steps are listed in the build file under steps: array.
The steps are ran one after another in the same order they were declared.
Each step is run inside a Docker container.
The image for the Docker container should be provided under image field.
The script field holds an array of all the commands to be run inside the container.
The working directory will be available in the container under /source/ directory.
By default the working directory is the directory where the comake command is run in.
It can be changed using --workdir option.
Please note that, as of now, if you need to use scripting features you need to use sh -c "<script>" (or similar for diffent shells).
Better shell support will be added in the future.