mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 05:38:04 +00:00
release notes
This commit is contained in:
parent
9361b8b3e9
commit
96955ffa9c
@ -1,12 +1,14 @@
|
||||
|
||||
Major release! Upgraded underlying yaml parser, re-written majority of yq. This has brought on a number of features that have been in demand for a while (see below).
|
||||
|
||||
This is in beta and needs some community feedback and testing :)
|
||||
|
||||
# New Features
|
||||
- Keeps yaml comments and formatting (string blocks are saved, number formatting is preserved, so it won't drop off trailing 0s for values like 0.10, which is important when that's a version entry )
|
||||
|
||||
- Handles anchors! (doc link)
|
||||
- Can specify yaml tags (e.g. !!int), quoting values no longer sufficient, need to specify the tag value instead.
|
||||
- Can print out matching paths and values when splatting (doc link)
|
||||
- Keeps yaml comments and formatting, can specify yaml tags when updating. https://github.com/mikefarah/yq/issues/19, https://github.com/mikefarah/yq/issues/169, https://github.com/mikefarah/yq/issues/107, https://github.com/mikefarah/yq/issues/171, https://github.com/mikefarah/yq/issues/245, https://github.com/mikefarah/yq/issues/303,https://github.com/mikefarah/yq/issues/308,https://github.com/mikefarah/yq/issues/314
|
||||
- Handles anchors! https://github.com/mikefarah/yq/issues/310, https://github.com/mikefarah/yq/issues/178
|
||||
- Can print out matching paths and values when splatting https://github.com/mikefarah/yq/issues/20
|
||||
- JSON output works for all commands! Yaml files with multiple documents are printed out as one JSON document per line.
|
||||
- Deep splat (**) to match arbitrary paths, (doc link)
|
||||
- Deep splat (**) to match arbitrary paths
|
||||
|
||||
|
||||
# Breaking changes
|
||||
@ -14,6 +16,24 @@
|
||||
## Update scripts file format has changed to be more powerful.
|
||||
Comments can be added, and delete commands have been introduced.
|
||||
|
||||
Before:
|
||||
```yaml
|
||||
b.e[+].name: Mike Farah
|
||||
```
|
||||
|
||||
After:
|
||||
```yaml
|
||||
- command: update
|
||||
path: b.e[+].thing
|
||||
value:
|
||||
#great
|
||||
things: frog # wow!
|
||||
- command: delete
|
||||
path: b.d
|
||||
```
|
||||
|
||||
https://github.com/mikefarah/yq/issues/305
|
||||
|
||||
## Reading and splatting, matching results are printed once per line.
|
||||
e.g:
|
||||
|
||||
@ -27,7 +47,9 @@ parent:
|
||||
there2: also matches
|
||||
```
|
||||
|
||||
```bash
|
||||
yq r sample.yaml 'parent.*.there*'
|
||||
```
|
||||
|
||||
old
|
||||
```yaml
|
||||
@ -49,8 +71,4 @@ yq r --printMode pv sample.yaml 'parent.*.there*'
|
||||
```yaml
|
||||
parent.childB.there: matches
|
||||
parent.childB.there2: also matches
|
||||
```
|
||||
|
||||
# Merge command
|
||||
- New flag 'autocreates' missing entries in target by default, new flag to turn that off.
|
||||
|
||||
```
|
@ -3,8 +3,5 @@
|
||||
value:
|
||||
#great
|
||||
things: frog # wow!
|
||||
- command: update
|
||||
path: b.e[+].name
|
||||
value: Mike Farah
|
||||
- command: delete
|
||||
path: b.d
|
@ -32,5 +32,5 @@ upload() {
|
||||
done < <(find ./build -mindepth 1 -maxdepth 1 -print0)
|
||||
}
|
||||
|
||||
release
|
||||
# release
|
||||
upload
|
||||
|
@ -3,7 +3,7 @@
|
||||
# This assumes that gonative and gox is installed as per the 'one time setup' instructions
|
||||
# at https://github.com/inconshreveable/gonative
|
||||
|
||||
gox -ldflags "${LDFLAGS}" -output="build/{{.Dir}}_{{.OS}}_{{.Arch}}"
|
||||
gox -ldflags "${LDFLAGS}" -output="build/yq_{{.OS}}_{{.Arch}}"
|
||||
# include non-default linux builds too
|
||||
gox -ldflags "${LDFLAGS}" -os=linux -output="build/{{.Dir}}_{{.OS}}_{{.Arch}}"
|
||||
gox -ldflags "${LDFLAGS}" -os=linux -output="build/yq_{{.OS}}_{{.Arch}}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user