github.com/chenbh/concourse/v6@v6.4.2/atc/resource/resource_check.go (about)

     1  package resource
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/chenbh/concourse/v6/atc"
     7  	"github.com/chenbh/concourse/v6/atc/runtime"
     8  )
     9  
    10  func (resource *resource) Check(
    11  	ctx context.Context,
    12  	spec runtime.ProcessSpec,
    13  	runnable runtime.Runner) ([]atc.Version, error) {
    14  	var versions []atc.Version
    15  
    16  	input, err := resource.Signature()
    17  	if err != nil {
    18  		return versions, err
    19  	}
    20  	err = runnable.RunScript(
    21  		ctx,
    22  		spec.Path,
    23  		nil,
    24  		input,
    25  		&versions,
    26  		nil,
    27  		false,
    28  	)
    29  	return versions, err
    30  }