-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update solution changes detected method in PR/pipelines #99
Labels
enhancement
New feature or request
Comments
@tdashworth been working on versioning for my own use/implementation of this and have a suggestion on a improvement for solution change detection (in GIT). What do you think about the solution approach? cc @ewingjm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Looking at the powershell script File here for how we detect which solutions have changed to manage incrementing the solution/s versioning.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
the current method uses "$resultArray = git show --name-only" , git show generally looks at commit/s in our use.
A Pull request can have multiple commits which I understand can limit your merge options to "squash merge"
if run post Pull request (build), solution/s version will not be tracked in the repo.
Describe the solution you'd like
A separate "Build" as part of the PR policy to manage solution versioning (reason below) .
Note, in the event, two active PRs with the same solution/s there is a chance of them both incrementing to the same version number without being detected, this will prevent the last one to merge into master/main from being deployed succesfully as they could have the same version number. to prevent this, the pull request build policy should be set to "Build expiration" "Immediately when master is updated" so that for the last one to merge into master/main versioning build will be re-ran and incremented
Replace "$resultArray = git show --name-only" with the below, which will instead highlight changes between the pull request source branch and the target branch
$targetbranch = $env:SYSTEM_PULLREQUEST_TARGETBRANCH.replace('refs/heads/', '')
$resultArray = git diff --name-only origin/$targetbranch
add to update solution version number in extracted solutions Solution.xml (source branch) (making sure it does not loop, for example when updated on source branch, it does not re-trigger and increment)
The text was updated successfully, but these errors were encountered: