chore: Add version checks for upstream tools (#121)

This commit is contained in:
Gerald Pinder 2024-03-17 14:14:07 -04:00 committed by GitHub
parent 0e3d6eba9e
commit 5fc4096f0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 238 additions and 84 deletions

View file

@ -1,3 +1,16 @@
#!/bin/sh
echo 'Running buildah'
print_version_json() {
local version="1.24.0"
printf '{"version": "%s"}\n' "$version"
}
main() {
if [[ "$1" == "version" && "$2" == "--json" ]]; then
print_version_json
else
echo 'Running buildah'
fi
}
main "$@"

View file

@ -1,3 +1,16 @@
#!/bin/sh
echo 'Running podman'
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
else
echo 'Running podman'
fi
}
main "$@"