feat: add ability to specify a custom build directory for an app

This commit is contained in:
Jose Diaz-Gonzalez
2021-03-21 21:42:39 -04:00
parent fbdb76e705
commit 6d40d52d7d
9 changed files with 133 additions and 7 deletions

View File

@@ -11,9 +11,12 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
}
flags := map[string]common.ReportFunc{
"--builder-computed-selected": reportComputedSelected,
"--builder-global-selected": reportGlobalSelected,
"--builder-selected": reportSelected,
"--builder-computed-selected": reportComputedSelected,
"--builder-global-selected": reportGlobalSelected,
"--builder-selected": reportSelected,
"--builder-computed-build-dir": reportComputedBuildDir,
"--builder-global-build-dir": reportGlobalBuildDir,
"--builder-build-dir": reportBuildDir,
}
flagKeys := []string{}
@@ -42,3 +45,19 @@ func reportGlobalSelected(appName string) string {
func reportSelected(appName string) string {
return common.PropertyGet("builder", appName, "selected")
}
func reportComputedBuildDir(appName string) string {
value := reportBuildDir(appName)
if value == "" {
value = reportGlobalBuildDir(appName)
}
return value
}
func reportGlobalBuildDir(appName string) string {
return common.PropertyGet("builder", "--global", "build-dir")
}
func reportBuildDir(appName string) string {
return common.PropertyGet("builder", appName, "build-dir")
}