CLI for reading/writing project metadata
$ go get github.com/screwdriver-cd/meta-cli
$ cd $GOPATH/src/github.com/screwdriver-cd/meta-cli
$ go build -a -o meta
$ ./meta --help
NAME:
meta-cli - get or set metadata for Screwdriver build
USAGE:
meta command arguments [options]
VERSION:
0.0.0
COMMANDS:
get Get a metadata with key
set Set a metadata with key and value
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--meta-space value Location of meta temporarily (default: "/sd/meta")
--help, -h show help
--version, -v print the version
COPYRIGHT:
(c) 2017 Yahoo Inc.
---
NAME:
meta get - Get a metadata with key
USAGE:
meta get [command options] [arguments...]
OPTIONS:
--external value, -e value External pipeline meta (default: "meta")
--json-value, -j Treat value as json
---
NAME:
meta set - Set a metadata with key and value
USAGE:
meta set [command options] [arguments...]
OPTIONS:
--json-value, -j Treat value as json
$ ./meta set aaa bbb
$ ./meta get aaa
bbb
$ ./meta set foo[2].bar[1] baz
[null,null,{"bar":[null,"baz"]}]
$ ./meta set foo '{"bar": "baz", "buz": 123}' --json-value
$ ./meta get foo --json-value
{"bar":"baz","buz":123}
$ ./meta get foo.bar
baz
$ ./meta get foo.bar --json-value
"baz"
$ go get github.com/screwdriver-cd/meta-cli
$ go test -cover github.com/screwdriver-cd/meta-cli/...
Code licensed under the BSD 3-Clause license. See LICENSE file for terms.