From cd80d36ccdfa31a5aea74729e91caebc7a4286ae Mon Sep 17 00:00:00 2001 From: Nikolai Norman Andersen Date: Wed, 23 May 2018 22:13:51 +0200 Subject: [PATCH 1/4] Change way of locating starter.cmd in Fake.Azure.Kudu --- src/app/Fake.Azure.Kudu/Kudu.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/Fake.Azure.Kudu/Kudu.fs b/src/app/Fake.Azure.Kudu/Kudu.fs index 6826d3940c3..9e6201fcba5 100644 --- a/src/app/Fake.Azure.Kudu/Kudu.fs +++ b/src/app/Fake.Azure.Kudu/Kudu.fs @@ -17,7 +17,7 @@ let nextManifestPath = Environment.environVarOrDefault "NEXT_MANIFEST_PATH" Stri /// Used by KuduSync for tracking and diffing deployments. let previousManifestPath = Environment.environVarOrDefault "PREVIOUS_MANIFEST_PATH" String.Empty /// The path to the KuduSync application. -let kuduPath = (Environment.environVarOrDefault "GO_WEB_CONFIG_TEMPLATE" ".") |> DirectoryInfo.ofPath +let kuduPath = (Environment.environVarOrDefault "GO_WEB_CONFIG_TEMPLATE" ".") |> Path.GetDirectoryName /// The different types of web jobs. type WebJobType = Scheduled | Continuous @@ -55,7 +55,7 @@ let kuduSync() = let result = Process.execWithResult(fun psi -> { psi with - FileName = Path.Combine(kuduPath.FullName, "kudusync.cmd") + FileName = Path.Combine(kuduPath, "kudusync.cmd") Arguments = sprintf """-v 50 -f "%s" -t "%s" -n "%s" -p "%s" -i ".git;.hg;.deployment;deploy.cmd""" deploymentTemp deploymentTarget nextManifestPath previousManifestPath }) (TimeSpan.FromMinutes 5.) result.Results |> Seq.iter (fun cm -> printfn "%O: %s" cm.Timestamp cm.Message) From c1f3db00da558fb5dbf30740749a38d2b193fc86 Mon Sep 17 00:00:00 2001 From: nikolaia Date: Tue, 12 Jun 2018 17:05:33 +0200 Subject: [PATCH 2/4] Add missing quotation mark in Kudu.fs --- src/app/Fake.Azure.Kudu/Kudu.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/Fake.Azure.Kudu/Kudu.fs b/src/app/Fake.Azure.Kudu/Kudu.fs index 9e6201fcba5..f3b6df623b7 100644 --- a/src/app/Fake.Azure.Kudu/Kudu.fs +++ b/src/app/Fake.Azure.Kudu/Kudu.fs @@ -56,7 +56,7 @@ let kuduSync() = Process.execWithResult(fun psi -> { psi with FileName = Path.Combine(kuduPath, "kudusync.cmd") - Arguments = sprintf """-v 50 -f "%s" -t "%s" -n "%s" -p "%s" -i ".git;.hg;.deployment;deploy.cmd""" deploymentTemp deploymentTarget nextManifestPath previousManifestPath }) + Arguments = sprintf """-v 50 -f "%s" -t "%s" -n "%s" -p "%s" -i ".git;.hg;.deployment;deploy.cmd" """ deploymentTemp deploymentTarget nextManifestPath previousManifestPath }) (TimeSpan.FromMinutes 5.) result.Results |> Seq.iter (fun cm -> printfn "%O: %s" cm.Timestamp cm.Message) if not result.OK then failwith "Error occurred during Kudu Sync deployment." From 3d480a509408f15410cc62987e15d9046a30dcac Mon Sep 17 00:00:00 2001 From: Nikolai Norman Andersen Date: Thu, 14 Jun 2018 14:49:46 +0200 Subject: [PATCH 3/4] Use Args.toWindowsCommandLine for command line arguments in Fake.Azure.Kudu --- src/app/Fake.Azure.Kudu/Kudu.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/Fake.Azure.Kudu/Kudu.fs b/src/app/Fake.Azure.Kudu/Kudu.fs index f3b6df623b7..5ef03316912 100644 --- a/src/app/Fake.Azure.Kudu/Kudu.fs +++ b/src/app/Fake.Azure.Kudu/Kudu.fs @@ -56,7 +56,7 @@ let kuduSync() = Process.execWithResult(fun psi -> { psi with FileName = Path.Combine(kuduPath, "kudusync.cmd") - Arguments = sprintf """-v 50 -f "%s" -t "%s" -n "%s" -p "%s" -i ".git;.hg;.deployment;deploy.cmd" """ deploymentTemp deploymentTarget nextManifestPath previousManifestPath }) + Arguments = Args.toWindowsCommandLine [ "-v"; "50"; "-f"; deploymentTemp; "-t"; deploymentTarget; "-n"; nextManifestPath; "-p"; previousManifestPath; "-i"; ".git;.hg;.deployment;deploy.cmd" ]}) (TimeSpan.FromMinutes 5.) result.Results |> Seq.iter (fun cm -> printfn "%O: %s" cm.Timestamp cm.Message) if not result.OK then failwith "Error occurred during Kudu Sync deployment." From fcd8309f85f8c048df89c548e222b7d9bb3d9f9b Mon Sep 17 00:00:00 2001 From: Nikolai Norman Andersen Date: Thu, 14 Jun 2018 14:55:26 +0200 Subject: [PATCH 4/4] Change Fake.Azure.Kudu to return current dir on missing GO_WEB_CONFIG_TEMPLATE --- src/app/Fake.Azure.Kudu/Kudu.fs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/Fake.Azure.Kudu/Kudu.fs b/src/app/Fake.Azure.Kudu/Kudu.fs index 5ef03316912..8991fe9a67e 100644 --- a/src/app/Fake.Azure.Kudu/Kudu.fs +++ b/src/app/Fake.Azure.Kudu/Kudu.fs @@ -17,7 +17,12 @@ let nextManifestPath = Environment.environVarOrDefault "NEXT_MANIFEST_PATH" Stri /// Used by KuduSync for tracking and diffing deployments. let previousManifestPath = Environment.environVarOrDefault "PREVIOUS_MANIFEST_PATH" String.Empty /// The path to the KuduSync application. -let kuduPath = (Environment.environVarOrDefault "GO_WEB_CONFIG_TEMPLATE" ".") |> Path.GetDirectoryName +let kuduPath = + Environment.environVarOrNone "GO_WEB_CONFIG_TEMPLATE" + |> function + | Some goWebConfigTemplate -> Path.GetDirectoryName goWebConfigTemplate + | None -> "." + |> DirectoryInfo.ofPath /// The different types of web jobs. type WebJobType = Scheduled | Continuous @@ -55,7 +60,7 @@ let kuduSync() = let result = Process.execWithResult(fun psi -> { psi with - FileName = Path.Combine(kuduPath, "kudusync.cmd") + FileName = Path.Combine(kuduPath.FullName, "kudusync.cmd") Arguments = Args.toWindowsCommandLine [ "-v"; "50"; "-f"; deploymentTemp; "-t"; deploymentTarget; "-n"; nextManifestPath; "-p"; previousManifestPath; "-i"; ".git;.hg;.deployment;deploy.cmd" ]}) (TimeSpan.FromMinutes 5.) result.Results |> Seq.iter (fun cm -> printfn "%O: %s" cm.Timestamp cm.Message)