Environment variable to specify the build branch

This commit is contained in:
Victor Hurdugaci 2015-02-03 10:27:17 -08:00
parent da5a292b12
commit afb8f51d19
1 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ use import="BuildEnv"
functions
@{
static string BUILD_BRANCH = Environment.GetEnvironmentVariable("BUILD_BRANCH") ?? "dev";
static string BASE_DIR = Directory.GetCurrentDirectory();
static string TARGET_DIR = Path.Combine(BASE_DIR, "artifacts", "build");
string[] repos = new[] {
@ -424,7 +425,7 @@ functions
if(Directory.Exists(repo))
{
GitPull(repoUrl, "dev", repo);
GitPull(repoUrl, BUILD_BRANCH, repo);
}
else
{
@ -438,7 +439,7 @@ functions
try
{
GitClone(repoUrl, "dev");
GitClone(repoUrl, BUILD_BRANCH);
}
catch (Exception ex)
{