refactor(recipe): store sample env path in new struct
This commit is contained in:
parent
73e9b818b4
commit
2f41b6d8b4
@ -239,10 +239,12 @@ func Get(recipeName string, offline bool) (Recipe, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Get2(name string) Recipe2 {
|
func Get2(name string) Recipe2 {
|
||||||
|
dir := path.Join(config.RECIPES_DIR, name)
|
||||||
return Recipe2{
|
return Recipe2{
|
||||||
Name: name,
|
Name: name,
|
||||||
Dir: path.Join(config.RECIPES_DIR, name),
|
Dir: dir,
|
||||||
SSHURL: fmt.Sprintf(config.SSH_URL_TEMPLATE, name),
|
SSHURL: fmt.Sprintf(config.SSH_URL_TEMPLATE, name),
|
||||||
|
SampleEnvPath: path.Join(dir, ".env.sample"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,6 +252,8 @@ type Recipe2 struct {
|
|||||||
Name string
|
Name string
|
||||||
Dir string
|
Dir string
|
||||||
SSHURL string
|
SSHURL string
|
||||||
|
|
||||||
|
SampleEnvPath string
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetRecipesLocal retrieves all local recipe directories
|
// GetRecipesLocal retrieves all local recipe directories
|
||||||
|
Loading…
x
Reference in New Issue
Block a user