这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
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
15 changes: 13 additions & 2 deletions .circleci/ciignore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,20 @@ if [[ ! -a "$ROOT/.ciignore" ]]; then
exit # If .ciignore doesn't exists, just quit this script
fi

changes="$(git diff-tree --no-commit-id --name-only -r origin/master..HEAD)"
# If branch is master, diff with origin/master will always be empty. Depend on
# CIRCLE_COMPARE_URL first and if its not set, check for diff with master.
if [[ ! -z "$CIRCLE_COMPARE_URL" ]]; then
# CIRCLE_COMPARE_URL is not empty, use it to get the diff
COMMIT_RANGE=$(echo $CIRCLE_COMPARE_URL | sed 's:^.*/compare/::g')
echo "Diff: $COMMIT_RANGE"
changes="$(git diff $COMMIT_RANGE --name-only)"
else
# CIRCLE_COMPARE_URL is not set, diff with origin/master
echo "Diff: origin/master..HEAD"
changes="$(git diff-tree --no-commit-id --name-only -r origin/master..HEAD)"
fi

echo "CHANGES FROM ORIGIN/MASTER:"
echo "Changes in this build:"
echo $changes
echo

Expand Down