Skip to content

Commit 964ac37

Browse files
authored
chore: updating run binary CI scripts to support external contributors (#23021)
1 parent 2fd495c commit 964ac37

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

circle.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,16 @@ commands:
873873
# Ensure we're installing the node-version for the cloned repo
874874
command: |
875875
if [[ -f .node-version ]]; then
876-
curl -L https://raw.githubusercontent.com/cypress-io/cypress/<< pipeline.git.branch >>/scripts/ensure-node.sh --output ci-ensure-node.sh
876+
branch="<< pipeline.git.branch >>"
877+
878+
externalBranchPattern='^pull\/[0-9]+'
879+
if [[ $branch =~ $externalBranchPattern ]]; then
880+
# We are unable to curl from the external PR branch location
881+
# so we fall back to develop
882+
branch="develop"
883+
fi
884+
885+
curl -L https://raw.githubusercontent.com/cypress-io/cypress/$branch/scripts/ensure-node.sh --output ci-ensure-node.sh
877886
else
878887
# if no .node-version file exists, we no-op the node script and use the global yarn
879888
echo '' > ci-ensure-node.sh

0 commit comments

Comments
 (0)