From 13909a32d41628a88983e5206dedf9999e0468e0 Mon Sep 17 00:00:00 2001 From: njlr Date: Thu, 26 Sep 2019 14:48:32 +0100 Subject: [PATCH] * Adds BUCKAROO_USE_BUCK env var --- buckaroo/Tasks.fs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/buckaroo/Tasks.fs b/buckaroo/Tasks.fs index fa2c113..4368edc 100644 --- a/buckaroo/Tasks.fs +++ b/buckaroo/Tasks.fs @@ -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