mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Make CircleCI run shallow clones of the React Native repo (#34455)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/34455 # Changelog [General][Fixed] - Fix shallow cloning break on main. Introduced in [#34438](https://github.com/facebook/react-native/pull/34438) Failed to fix in [#34453](https://github.com/facebook/react-native/pull/34453) Reviewed By: cipolleschi Differential Revision: D38859731 fbshipit-source-id: 8c5f5ee04ff0f08a6a3af1266ef399a36fde9ae8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fb936dfffb
commit
e142de0928
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user