Skip to content

Commit 8800cbf

Browse files
authored
Merge pull request #4996 from wilzbach/circleci-master-fallback
CircleCi: use master as fallback for DMD and Druntime
2 parents 5154c66 + 9184e90 commit 8800cbf

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

circleci.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,15 @@ setup_repos()
7474
git merge -m "Automatic merge" $current_branch
7575
fi
7676

77-
clone https://github.com/dlang/dmd.git ../dmd $base_branch --depth 1
78-
clone https://github.com/dlang/druntime.git ../druntime $base_branch --depth 1
77+
for proj in dmd druntime ; do
78+
if [ $base_branch != master ] && [ $base_branch != stable ] &&
79+
! git ls-remote --exit-code --heads https://github.com/dlang/$proj.git $base_branch > /dev/null; then
80+
# use master as fallback for other repos to test feature branches
81+
clone https://github.com/dlang/$proj.git ../$proj master --depth 1
82+
else
83+
clone https://github.com/dlang/$proj.git ../$proj $base_branch --depth 1
84+
fi
85+
done
7986

8087
# load environment for bootstrap compiler
8188
source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash ~/dlang/install.sh dmd-$HOST_DMD_VER --activate)"

0 commit comments

Comments
 (0)