-
Notifications
You must be signed in to change notification settings - Fork 1
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
yaml merge key handling #11
Conversation
Signed-off-by: clux <sszynrae@gmail.com>
don't need to strip in profile if we do it in release job besides, strip fails on mac with serde now release cleanup: why are we putting readme + license in the archive? Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
three options here: make this mandatory for yamlPRO: always merge on yaml, less user confusion
make it opt -in as a flagPRO: two different ways to parse yaml, one cheap, one more expensive. we support both.
make it opt-in as an input formatPRO: more cleanly separates the the distinction, and no extra flag that only works with yaml needed
kind of leaning to keeping it as an opt-in flag for now. |
Signed-off-by: clux <sszynrae@gmail.com>
decided on |
Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
ok tried three different variants on documents with merge and it's all weird AF if you don't apply merges (we are already singleton mapping so it's really odd to not apply merges). here's what the circle test looks like with partial expanding (singleton but no apply_merge): # yq -y --partial-expand .workflows test/circle.yaml
my_flow:
jobs:
- build:
filters:
<<:
tags:
only: /.*/
- release:
filters:
<<:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*/ which incidentally is also how it looks even without singleton mapping... with both it looks like this: $ yq -y .workflows test/circle.yml
my_flow:
jobs:
- build:
filters:
tags:
only: /.*/
- release:
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*/ so have left full expansion the only sensible behaviour |
Signed-off-by: clux <sszynrae@gmail.com>
have it working under an optional flag that only works with yaml input.
not sure if this is enough to warrant a different input enum, or if it just needs another flag (that doesn't clash with jq) that only works in the yaml mode..
maybe we should just always do this for yaml tbh - it makes no sense to pass through tags to jq.