-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathapps-uwp-variables.cake
58 lines (46 loc) · 1.68 KB
/
apps-uwp-variables.cake
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#l "./buildserver.cake"
//-------------------------------------------------------------
public class UwpContext : BuildContextWithItemsBase
{
public UwpContext(IBuildContext parentBuildContext)
: base(parentBuildContext)
{
}
public string WindowsStoreAppId { get; set; }
public string WindowsStoreClientId { get; set; }
public string WindowsStoreClientSecret { get; set; }
public string WindowsStoreTenantId { get; set; }
protected override void ValidateContext()
{
}
protected override void LogStateInfoForContext()
{
CakeContext.Information($"Found '{Items.Count}' uwp projects");
}
}
//-------------------------------------------------------------
private UwpContext InitializeUwpContext(BuildContext buildContext, IBuildContext parentBuildContext)
{
var data = new UwpContext(parentBuildContext)
{
Items = UwpApps ?? new List<string>(),
WindowsStoreAppId = buildContext.BuildServer.GetVariable("WindowsStoreAppId", showValue: true),
WindowsStoreClientId = buildContext.BuildServer.GetVariable("WindowsStoreClientId", showValue: false),
WindowsStoreClientSecret = buildContext.BuildServer.GetVariable("WindowsStoreClientSecret", showValue: false),
WindowsStoreTenantId = buildContext.BuildServer.GetVariable("WindowsStoreTenantId", showValue: false)
};
return data;
}
//-------------------------------------------------------------
List<string> _uwpApps;
public List<string> UwpApps
{
get
{
if (_uwpApps is null)
{
_uwpApps = new List<string>();
}
return _uwpApps;
}
}