github.com/beauknowssoftware/makehcl@v0.0.0-20200322000747-1b9bb1e1c008/internal/definition/command.go (about)

     1  package definition
     2  
     3  type Command struct {
     4  	Name         Target
     5  	Command      string
     6  	Dependencies []Target
     7  	Environment  map[string]string
     8  }
     9  
    10  func (c Command) AsRule() *Rule {
    11  	return &Rule{
    12  		IsPhony:      true,
    13  		Target:       c.Name,
    14  		Command:      c.Command,
    15  		Dependencies: c.Dependencies,
    16  		Environment:  c.Environment,
    17  	}
    18  }