Skip to content

Commit

Permalink
Merge pull request #5796 from habitat-sh/changed
Browse files Browse the repository at this point in the history
fix the changed files returned in a merge commit
  • Loading branch information
mwrock committed Nov 14, 2018
2 parents 7db2fa5 + f4633c6 commit 3e7d308
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions support/ci/appveyor.ps1
Expand Up @@ -22,14 +22,14 @@ function Test-SentinelBuild() {
}

function Get-ChangedFiles {
if (Test-PullRequest -or Test-SentinelBuild) {
# for pull requests or sentinel builds diff
# against master
git diff master --name-only
} else {
# for master builds, check against the last merge
git show :/^Merge --pretty=format:%H -m --name-only
$sha = (git rev-parse HEAD)
$lastMerge = (git log --merges --max-count=1 --pretty=format:%H)

if($sha -eq $lastMerge) {
$lastMerge=(git log --merges --max-count=1 --skip=1 --pretty=format:%H)
}

git diff master --name-only $lastMerge
}

function Test-SourceChanged {
Expand Down

0 comments on commit 3e7d308

Please sign in to comment.