diff --git a/Makefile b/Makefile index e4071ea..f1a200c 100644 --- a/Makefile +++ b/Makefile @@ -9,10 +9,10 @@ release: spiff_linux_amd64.zip spiff_darwin_amd64.zip spiff_linux_amd64.zip: GOPATH=$(GOPATH) GOOS=linux GOARCH=amd64 go build -o spiff++/spiff++ . - zip spiff++/spiff_linux_amd64.zip spiff++/spiff++ + (cd spiff++; zip spiff_linux_amd64.zip spiff++) rm spiff++/spiff++ spiff_darwin_amd64.zip: GOPATH=$(GOPATH) GOOS=darwin GOARCH=amd64 go build -o spiff++/spiff++ . - zip spiff++/spiff_darwin_amd64.zip spiff++/spiff++ + (cd spiff++; zip spiff_darwin_amd64.zip spiff++) rm spiff++/spiff++ diff --git a/dynaml/dynamic_expression.go b/dynaml/dynamic_expression.go index ecc0222..f4ccd4c 100644 --- a/dynaml/dynamic_expression.go +++ b/dynaml/dynamic_expression.go @@ -64,7 +64,7 @@ func (e DynamicExpr) Evaluate(binding Binding, locally bool) (interface{}, Evalu return info.Error("index or field name required for reference qualifier") } return ReferenceExpr{qual}.find(func(end int, path []string) (yaml.Node, bool) { - return yaml.Find(node(root, nil), path...) + return yaml.Find(node(root, nil), path[:end+1]...) }, binding, locally) } diff --git a/dynaml/reference.go b/dynaml/reference.go index 732ce66..1ffc547 100644 --- a/dynaml/reference.go +++ b/dynaml/reference.go @@ -33,6 +33,7 @@ func (e ReferenceExpr) find(f func(int, []string) (node yaml.Node, x bool), bind var ok bool info := DefaultInfo() + debug.Debug("resolving ref [%v]", e.Path) for i := 0; i < len(e.Path); i++ { step, ok = f(i, e.Path) diff --git a/dynaml/x509/certificate.go b/dynaml/x509/certificate.go index d4b8f4d..6a9b671 100644 --- a/dynaml/x509/certificate.go +++ b/dynaml/x509/certificate.go @@ -180,8 +180,8 @@ func func_x509cert(arguments []interface{}, binding Binding) (interface{}, Evalu NotBefore: notBefore, NotAfter: notAfter, - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, - ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, + KeyUsage: 0, + ExtKeyUsage: []x509.ExtKeyUsage{}, BasicConstraintsValid: true, } diff --git a/spiff++.go b/spiff++.go index 5291c2b..a046672 100644 --- a/spiff++.go +++ b/spiff++.go @@ -21,9 +21,9 @@ import ( func main() { app := cli.NewApp() - app.Name = "spiff" - app.Usage = "BOSH deployment manifest toolkit" - app.Version = "1.2.0" + app.Name = "spiff++" + app.Usage = "deployment manifest toolkit" + app.Version = "1.2.1" app.Commands = []cli.Command{ {