Skip to content

Commit f797602

Browse files
committed
Allow update-checkout to switch to master/stable
1 parent ee4d9d3 commit f797602

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

utils/update-checkout

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@ REPOSITORIES = {
3939
'swift-integration-tests': 'apple/swift-integration-tests',
4040
}
4141

42+
MASTER_BRANCHES = {
43+
'llvm': 'stable',
44+
'clang': 'stable',
45+
'swift': 'master',
46+
'lldb': 'master',
47+
'cmark': 'master',
48+
'llbuild': 'master',
49+
'swiftpm': 'master',
50+
'swift-corelibs-xctest': 'master',
51+
'swift-corelibs-foundation': 'master',
52+
'swift-corelibs-libdispatch': 'master',
53+
'swift-integration-tests': 'master',
54+
}
55+
4256
NEXT_BRANCHES = {
4357
'llvm': 'stable-next',
4458
'clang': 'stable-next',
@@ -110,7 +124,9 @@ def obtain_additional_swift_sources(
110124
check_call(['git', 'clone', '--recursive', remote,
111125
dir_name])
112126
if branch:
113-
if branch == "stable-next" or branch == "master-next":
127+
if branch == "master" or branch == "stable":
128+
repo_branch = MASTER_BRANCHES[dir_name]
129+
elif branch == "stable-next" or branch == "master-next":
114130
repo_branch = NEXT_BRANCHES[dir_name]
115131
elif branch == "swift-3.0-branch" or \
116132
branch == "swift-3.0-preview-1-branch":
@@ -169,7 +185,9 @@ By default, updates your checkouts of Swift, SourceKit, LLDB, and SwiftPM.""")
169185
print("--- Skipping '" + dir_name + "' ---")
170186
continue
171187
if branch:
172-
if branch == "stable-next" or branch == "master-next":
188+
if branch == "master" or branch == "stable":
189+
repo_branch = MASTER_BRANCHES[dir_name]
190+
elif branch == "stable-next" or branch == "master-next":
173191
repo_branch = NEXT_BRANCHES[dir_name]
174192
elif branch == "swift-3.0-branch" or \
175193
branch == "swift-3.0-preview-1-branch":

0 commit comments

Comments
 (0)