Skip to content
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

Sync eng/common directory with azure-sdk-tools for PR 1425 #18868

Merged
merged 5 commits into from
Feb 19, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update get-markdown-files-from-changed-files.ps1
  • Loading branch information
sima-zhu authored and azure-sdk committed Feb 19, 2021
commit 669cb79ddcde421efff45fc5c720e783bda4ef14
9 changes: 3 additions & 6 deletions eng/common/scripts/get-markdown-files-from-changed-files.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ param (
[string] $targetBranch = ("origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH}" -replace "refs/heads/")
)

# Trim the "ref/head" for master branch
$targetBranch = $targetBranch -replace "refs/heads/"

$deletedFiles = (git diff "origin/$targetBranch" HEAD --name-only --diff-filter=D)
$renamedFiles = (git diff "origin/$targetBranch" HEAD --diff-filter=R)
$changedMarkdowns = (git diff "origin/$targetBranch" HEAD --name-only -- '*.md')
$deletedFiles = (git diff $targetBranch HEAD --name-only --diff-filter=D)
$renamedFiles = (git diff $targetBranch HEAD --diff-filter=R)
$changedMarkdowns = (git diff $targetBranch HEAD --name-only -- '*.md')

$beforeRenameFiles = @()
# Retrieve the 'renamed from' files. Git command only returns back the files after rename.
Expand Down