The `build` subcommand can now take in any number of recipe files and will build them all in parallel. Along with this new ability, I've added a way to easily distinguish which part of the build log belongs to which recipe. Check out the `docker_build` action of this PR for an example.  ## Tasks - [x] Make build log follow same pattern as normal logs to keep things consistent - [x] Update color ranges based on @xynydev 's feedback - [x] Deal with ANSI control characters in log output - [x] Add [`indicatif`](https://crates.io/crates/indicatif) to make logs look nicer - [x] Add ability to print logs to a file
21 lines
483 B
Bash
Executable file
21 lines
483 B
Bash
Executable file
#!/bin/bash
|
|
|
|
print_version_json() {
|
|
local version="4.0.0"
|
|
printf '{"Client":{"Version": "%s"}}\n' "$version"
|
|
}
|
|
|
|
main() {
|
|
if [[ "$1" == "version" && "$2" == "-f" && "$3" == "json" ]]; then
|
|
print_version_json
|
|
elif [[ "$1" == "build" && "$7" == *"cli_test.tar.gz" ]]; then
|
|
tarpath=$(echo "$7" | awk -F ':' '{print $2}')
|
|
echo "Exporting image to a tarball (JK JUST A MOCK!)"
|
|
echo "${tarpath}"
|
|
touch $tarpath
|
|
else
|
|
echo 'Running podman'
|
|
fi
|
|
}
|
|
|
|
main "$@"
|