Skip to content

Commit

Permalink
Make CircleCI run shallow clones of the React Native repo (#34455)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #34455

# Changelog
[General][Fixed] - Fix shallow cloning break on main.

Introduced in [#34438](#34438)
Failed to fix in [#34453](#34453)

Reviewed By: cipolleschi

Differential Revision: D38859731

fbshipit-source-id: 8c5f5ee04ff0f08a6a3af1266ef399a36fde9ae8
  • Loading branch information
throwaway-fishery authored and facebook-github-bot committed Aug 19, 2022
1 parent fb936df commit e142de0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ commands:
command: |
git clone --branch main --no-checkout "$CIRCLE_REPOSITORY_URL" --single-branch .
# Fetch from fork if applicable
if [ -z $CIRCLE_PR_NUMBER ] ; then
if [ -n "$CIRCLE_PR_NUMBER" ] ; then
git fetch --force --depth 1 origin +refs/pull/$CIRCLE_PR_NUMBER/head:refs/remotes/origin/pull/$CIRCLE_PR_NUMBER
fi
if [ -z $CIRCLE_BRANCH ] ; then
if [ -n "$CIRCLE_BRANCH" ] ; then
git checkout --force -B "$CIRCLE_BRANCH" "$CIRCLE_SHA1"
else
git checkout main
Expand Down

0 comments on commit e142de0

Please sign in to comment.