github.com/jghiloni/cli@v6.28.1-0.20170628223758-0ce05fe032a2+incompatible/actor/pushaction/merge_and_validate_settings_and_manifest.go (about)

     1  package pushaction
     2  
     3  import (
     4  	"errors"
     5  
     6  	"code.cloudfoundry.org/cli/actor/pushaction/manifest"
     7  	log "github.com/sirupsen/logrus"
     8  )
     9  
    10  func (_ Actor) MergeAndValidateSettingsAndManifests(cmdConfig CommandLineSettings, apps []manifest.Application) ([]manifest.Application, error) {
    11  	if len(apps) != 0 {
    12  		return nil, errors.New("functionality still pending")
    13  	}
    14  
    15  	path := cmdConfig.AppPath
    16  	if path == "" {
    17  		path = cmdConfig.CurrentDirectory
    18  	}
    19  
    20  	manifests := []manifest.Application{{
    21  		Name:        cmdConfig.Name,
    22  		Path:        path,
    23  		DockerImage: cmdConfig.DockerImage,
    24  	}}
    25  
    26  	//TODO Add validations
    27  
    28  	log.Debugf("merged and validated manifests: %#v", manifests)
    29  	return manifests, nil
    30  }