v0.5.0
Changelog
v0.5.0 (2024-04-26)
Use the CLI in CI/CD
With the latest updates to the entities-service
CLI it can be used as intended in CI/CD workflows.
To make this happen, this release further upgrades the CLI, mainly by deprecating the --file/-f
and --dir/-d
inputs for the upload
and validate
commands in favor of a SOURCE...
argument, i.e., one can supply (relative or absolute) paths to files and directories multiple times to the commands, separating them by a space (or wrapping them in quotation marks (either "
or '
will work).
In addition, this new SOURCE...
argument is utilized in two cases:
- One can supply the arguments via
stdin
. - The
validate
command has been wrapped as a pre-commit hook.
The stdin
possibility allows one to do something like:
git diff --name-only | entities-service validate -
This will supply the validate
command with a list of files that are different between the current git
working directory and the previous commit.
pre-commit hook validate-entities
When using the hook, one should focus in the files it runs on via the files
hook argument. One must also supply the argument additional_dependencies
with the value '.[cli]'
(note, this argument expects a list, so this value should be one of the values in that list).
The hook will automatically run on all implemented formats (currently JSON and YAML/YML).
The hook will automatically use the --verbose
flag, should there be any content differences between the local and externally existing counterparts.
Implemented enhancements:
- ✨ Support piping in SOURCE's (filepaths and directories) #130
- ✨ New option
--strict
for thevalidate
command #129 - ✨ Run some CLI commands as pre-commit hooks #122
Closed issues:
- Only deploy service if changes in service is detected #92
Merged pull requests:
- Update README with pre-commit and CLI info #134 (@CasperWA)
- Add
--strict
option to CLI #132 (@CasperWA) - Support using stdin as input for CLI #131 (@CasperWA)
- Only deploy service to onto-ns.com if relevant changes detected #124 (@CasperWA)
* This Changelog was automatically generated by github_changelog_generator