Skip to content

How to generate delta for new files only? #719

Closed Answered by sjurgis
sjurgis asked this question in Q&A
Discussion options

You must be logged in to vote

Hmmm, thanks for posting this. I googled a bit and turns out solution might be much simpler - I can just grab a list added files and pass those to sfdx scanner.
i.e.

    git fetch origin $BITBUCKET_PR_DESTINATION_BRANCH
    FROM=$(git merge-base $BITBUCKET_COMMIT origin/$BITBUCKET_PR_DESTINATION_BRANCH)
    echo 'Common ancestor: '$FROM
    git diff --name-only --diff-filter=A $FROM..$BITBUCKET_COMMIT
    sfdx scanner:run --target $(git diff --name-only --diff-filter=A $FROM..$BITBUCKET_COMMIT)

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@scolladon
Comment options

Answer selected by scolladon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants