v0.15.0 Feature Release
Optional commands
The new feature allows a command (or "cmd") to be templated in such a way that it can yield an empty value.
The purpose of this feature is to make the CLI tool compatible in multiple environments. For example, if you have a command that sets up a container and its environment, you may want to be able to call that same command from within the container itself. With the new feature, the command can be templated to return an empty value when called within the container.
You can thus install the summon cli inside the container itself and make decisions based on call site. Below is an example where when called from inside container (as defined by an arbitrary inContainer
environment variable), the cmd
is empty (because the container provides the environment). This effectively allows the same invocation from inside or outside of the container.
cmd:
- |-
{{ if not (env "inContainer") }}
# setup container call
{{ end }}
What's Changed
- adds go.yml workflow for building with actions by @davidovich in #85
- Allow fully templated commands by @davidovich in #87
- Adds debug logging by @davidovich in #88
- Revert un conditional shlex by @davidovich in #89
Full Changelog: v0.14.0...v0.15.0