Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump overlay: support overwriting the input OpenAPI file #589

Open
hkosova opened this issue Nov 8, 2024 · 0 comments
Open

bump overlay: support overwriting the input OpenAPI file #589

hkosova opened this issue Nov 8, 2024 · 0 comments

Comments

@hkosova
Copy link

hkosova commented Nov 8, 2024

I have several large overlay files that I'm applying one by one and I'd like to have an option to force update the input OpenAPI file in-place. This will help simplify my automation scripts by eliminating the need to create and then delete multiple temporary files with intermediate results.

--out=INPUTFILE works but triggers an interactive confirmation prompt which I think isn't compatible with CI/CD.

> INPUTFILE does not work because it blanks the file before bump can read it, resulting in an error.

| sponge INPUTFILE is a possible workaround for macOS/*nix users, but we also have Windows users who can't use moreutils so it's not an option.


UPD: I found a way to silently overwrite the input spec on macOS/*nix:

echo y | bump overlay myspec.yaml overlay.yaml --out=myspec.yaml

but it would still be great to have a built-in option for cross-platform use.

@hkosova hkosova changed the title bump overlay: support overwriting the input file bump overlay: support overwriting the input OpenAPI file Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant