diff --git a/cmd/bundle/init.go b/cmd/bundle/init.go index 3038cb7a..3625b7a9 100644 --- a/cmd/bundle/init.go +++ b/cmd/bundle/init.go @@ -18,6 +18,10 @@ var gitUrlPrefixes = []string{ "git@", } +var aliasedTemplates = map[string]string{ + "mlops-stack": "https://github.com/databricks/mlops-stack", +} + func isRepoUrl(url string) bool { result := false for _, prefix := range gitUrlPrefixes { @@ -68,6 +72,11 @@ func newInitCommand() *cobra.Command { } } + // Expand templatePath if it's an alias for a known template + if _, ok := aliasedTemplates[templatePath]; ok { + templatePath = aliasedTemplates[templatePath] + } + if !isRepoUrl(templatePath) { // skip downloading the repo because input arg is not a URL. We assume // it's a path on the local file system in that case