mirror of https://github.com/databricks/cli.git
This commit is contained in:
parent
007a714750
commit
0c9fbf7b23
|
@ -13,13 +13,13 @@ type defineDefaultTarget struct {
|
||||||
name string
|
name string
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultTargetName = "default"
|
const DefaultTargetPlaceholder = "default"
|
||||||
|
|
||||||
// DefineDefaultTarget adds a target named "default"
|
// DefineDefaultTarget adds a target named "default"
|
||||||
// to the configuration if none have been defined.
|
// to the configuration if none have been defined.
|
||||||
func DefineDefaultTarget() bundle.Mutator {
|
func DefineDefaultTarget() bundle.Mutator {
|
||||||
return &defineDefaultTarget{
|
return &defineDefaultTarget{
|
||||||
name: DefaultTargetName,
|
name: DefaultTargetPlaceholder,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ Example usage:
|
||||||
// target is the default target, we don't need to pass it explicitly since
|
// target is the default target, we don't need to pass it explicitly since
|
||||||
// the CLI will use the default target by default.
|
// the CLI will use the default target by default.
|
||||||
// This is only useful for when the Databricks CLI is the child command.
|
// This is only useful for when the Databricks CLI is the child command.
|
||||||
if b.Config.Bundle.Target != mutator.DefaultTargetName {
|
if b.Config.Bundle.Target != mutator.DefaultTargetPlaceholder {
|
||||||
env = append(env, "DATABRICKS_BUNDLE_TARGET="+b.Config.Bundle.Target)
|
env = append(env, "DATABRICKS_BUNDLE_TARGET="+b.Config.Bundle.Target)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue