-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.linq
31 lines (24 loc) · 952 Bytes
/
publish.linq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<Query Kind="Program">
<Reference Relative="CloudPad\bin\Debug\net461\CloudPad.dll">C:\Users\leidegre\Source\tessin\cloud-pad2\CloudPad\bin\Debug\net461\CloudPad.dll</Reference>
<Reference><RuntimeDirectory>\System.IO.Compression.FileSystem.dll</Reference>
<Reference><RuntimeDirectory>\System.IO.Compression.dll</Reference>
<Namespace>CloudPad.Internal</Namespace>
<Namespace>System.IO.Compression</Namespace>
</Query>
void Main(string[] args)
{
if (!Directory.Exists(args[0] ?? ""))
{
$"Directory '{args[0]}' does not exist.".Dump();
return;
}
var publishSettingsFileName = FileUtil.ResolveSearchPatternUpDirectoryTree(Environment.CurrentDirectory, "*.PublishSettings").Single();
var kudu = KuduClient.FromPublishProfile(publishSettingsFileName);
if (Util.ReadLine($"publish to '{kudu.Host}' [y/n]?") != "y")
{
return;
}
kudu.ZipDeploy(args[0]);
"Done.".Dump();
}
// Define other methods and classes here