Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix locating kudusync.cmd in Fake.Azure.Kudu #1995

Merged
merged 4 commits into from
Jun 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/app/Fake.Azure.Kudu/Kudu.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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" ".") |> DirectoryInfo.ofPath
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
Expand Down Expand Up @@ -56,7 +61,7 @@ let kuduSync() =
Process.execWithResult(fun psi ->
{ psi with
FileName = Path.Combine(kuduPath.FullName, "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."
Expand Down