Environment variable to specify the build branch
This commit is contained in:
parent
da5a292b12
commit
afb8f51d19
|
|
@ -13,6 +13,7 @@ use import="BuildEnv"
|
||||||
|
|
||||||
functions
|
functions
|
||||||
@{
|
@{
|
||||||
|
static string BUILD_BRANCH = Environment.GetEnvironmentVariable("BUILD_BRANCH") ?? "dev";
|
||||||
static string BASE_DIR = Directory.GetCurrentDirectory();
|
static string BASE_DIR = Directory.GetCurrentDirectory();
|
||||||
static string TARGET_DIR = Path.Combine(BASE_DIR, "artifacts", "build");
|
static string TARGET_DIR = Path.Combine(BASE_DIR, "artifacts", "build");
|
||||||
string[] repos = new[] {
|
string[] repos = new[] {
|
||||||
|
|
@ -424,7 +425,7 @@ functions
|
||||||
|
|
||||||
if(Directory.Exists(repo))
|
if(Directory.Exists(repo))
|
||||||
{
|
{
|
||||||
GitPull(repoUrl, "dev", repo);
|
GitPull(repoUrl, BUILD_BRANCH, repo);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -438,7 +439,7 @@ functions
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
GitClone(repoUrl, "dev");
|
GitClone(repoUrl, BUILD_BRANCH);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue