forked from toolshed/abra
feat: define recipe version inside app env file
This commit is contained in:
@ -124,6 +124,13 @@ type Features struct {
|
||||
}
|
||||
|
||||
func Get(name string) Recipe {
|
||||
version := ""
|
||||
if strings.Contains(name, ":") {
|
||||
split := strings.Split(name, ":")
|
||||
name = split[0]
|
||||
version = split[1]
|
||||
}
|
||||
|
||||
gitURL := fmt.Sprintf("%s/%s.git", config.REPOS_BASE_URL, name)
|
||||
sshURL := fmt.Sprintf(config.SSH_URL_TEMPLATE, name)
|
||||
if strings.Contains(name, "/") {
|
||||
@ -142,10 +149,11 @@ func Get(name string) Recipe {
|
||||
dir := path.Join(config.RECIPES_DIR, escapeRecipeName(name))
|
||||
|
||||
return Recipe{
|
||||
Name: name,
|
||||
Dir: dir,
|
||||
GitURL: gitURL,
|
||||
SSHURL: sshURL,
|
||||
Name: name,
|
||||
Version: version,
|
||||
Dir: dir,
|
||||
GitURL: gitURL,
|
||||
SSHURL: sshURL,
|
||||
|
||||
ComposePath: path.Join(dir, "compose.yml"),
|
||||
ReadmePath: path.Join(dir, "README.md"),
|
||||
@ -155,10 +163,11 @@ func Get(name string) Recipe {
|
||||
}
|
||||
|
||||
type Recipe struct {
|
||||
Name string
|
||||
Dir string
|
||||
GitURL string
|
||||
SSHURL string
|
||||
Name string
|
||||
Version string
|
||||
Dir string
|
||||
GitURL string
|
||||
SSHURL string
|
||||
|
||||
ComposePath string
|
||||
ReadmePath string
|
||||
|
Reference in New Issue
Block a user