forked from chocolatey/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildData.cake
28 lines (26 loc) · 1.17 KB
/
buildData.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
public class BuildData
{
public string DeployRemote { get; set; }
public string DeployBranch { get; set; }
public DirectoryPath PublishDirectory { get; set; }
public DirectoryPath OutputDirectory { get; set; }
public string GitHubToken { get; set; }
public string GitHubUserName { get; set; }
public string GitHubPassword { get; set; }
public string ProjectPath { get; set; }
public BuildData(ICakeContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
DeployRemote = context.EnvironmentVariable("STATIQ_DEPLOY_REMOTE");
DeployBranch = context.EnvironmentVariable("STATIQ_DEPLOY_BRANCH");
PublishDirectory = context.MakeAbsolute(context.Directory("publish"));
OutputDirectory = context.MakeAbsolute(context.Directory("output"));
GitHubToken = context.EnvironmentVariable("STATIQ_GITHUB_TOKEN");
GitHubUserName = context.EnvironmentVariable("STATIQ_GITHUB_USER_NAME");
GitHubPassword = context.EnvironmentVariable("STATIQ_GITHUB_PASSWORD");
ProjectPath = context.EnvironmentVariable("STATIQ_PROJECT_PATH");
}
}