Skip to content

re #611 - Ensures branch with dynamic repositories and buildserver #612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Philo
Copy link
Contributor

@Philo Philo commented Aug 26, 2015

When using a dynamic repository with a buildserver the current branch will for most buildserver types return null or empty, this causes no branch to be set, dynamic repositories require a branch.

The fix ensures that if we are using dynamic repositories with a buildserver that if the buildserver does not return a branch we use the targetBranch specified via /b

… buildserver

When using a dynamic repository with a buildserver the current branch will
for most buildserver types return null or empty, this causes no branch to
be set, dynamic repositories require a branch.

The fix ensures that if we are using dynamic repositories with a
buildserver that if the buildserver does not return a branch we use the
targetBranch specified via /b
@JakeGinnivan
Copy link
Contributor

With this we no longer need the currentBranch ?? targetBranch as well right? Might be worth cleaning that up at the same time

Updates the BuildServerBase to provide a default implementation of
GetCurrentBranch() that returns null, derived build servers can override
if needed, this simplifies the resolution of the current branch name
within ExecuteCore
@Philo
Copy link
Contributor Author

Philo commented Aug 26, 2015

Indeed, I can do a small tidy up of the current branch resolution with ExecuteCore and perhaps standardise the return value of BuildServerBase.GetCurrentBranch() to return null by default unless overridden in a specific build server implementation (like VSO).

However this will mean that if using a dynamic repository with VSO the environment variable BUILD_SOURCEBRANCH will override the value of /b, but /b will still need to be specified as an argument. This may need to be addressed separately.

JakeGinnivan added a commit that referenced this pull request Aug 26, 2015
re #611 - Ensures branch with dynamic repositories and buildserver
@JakeGinnivan JakeGinnivan merged commit 93e36a9 into GitTools:master Aug 26, 2015
@Philo Philo deleted the feature/dynamic-repo-branch-teamcity branch August 26, 2015 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants