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)
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)