Skip to content

Commit

Permalink
* Adds BUCKAROO_USE_BUCK env var
Browse files Browse the repository at this point in the history
  • Loading branch information
njlr committed Sep 26, 2019
1 parent cc8a4ce commit 13909a3
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions buckaroo/Tasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,32 @@ let private isWindows () =
let private determineBuildSystem (logger : Logger) = async {
let useBazel =
Environment.GetEnvironmentVariable "BUCKAROO_USE_BAZEL"
|> isNull
|> String.IsNullOrWhiteSpace
|> not

if useBazel
then
return Bazel
else
let! hasBuckConfig = Files.exists ".buckconfig"
let useBuck =
Environment.GetEnvironmentVariable "BUCKAROO_USE_BUCK"
|> String.IsNullOrWhiteSpace
|> not

if hasBuckConfig
if useBuck
then
logger.Warning "Using the Buck build-system since a .buckconfig file was found. Set BUCKAROO_USE_BAZEL to override this. "
return Buck
else
return Bazel
let! hasBuckConfig = Files.exists ".buckconfig"

if hasBuckConfig
then
logger.Warning "Using the Buck build-system since a .buckconfig file was found. Set BUCKAROO_USE_BAZEL to override this or BUCKAROO_USE_BUCK to hide this warning. "
return Buck
else
return Bazel
}


let private getCachePath = async {
return
match System.Environment.GetEnvironmentVariable("BUCKAROO_CACHE_PATH") with
Expand Down

0 comments on commit 13909a3

Please sign in to comment.