Skip to content

Commit 1a2de3e

Browse files
committed
[Utils] Support to checkout swift-3.0-preview-1-branch
1 parent 9168b91 commit 1a2de3e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

utils/update-checkout

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ NEXT_BRANCHES = {
5353
'swift-integration-tests': 'master',
5454
}
5555

56+
SWIFT_3_0_PREVIEW_1_BRANCHES = {
57+
'llvm': 'swift-3.0-branch',
58+
'clang': 'swift-3.0-branch',
59+
'swift': 'swift-3.0-preview-1-branch',
60+
'lldb': 'swift-3.0-preview-1-branch',
61+
'cmark': 'swift-3.0-preview-1-branch',
62+
'llbuild': 'swift-3.0-preview-1-branch',
63+
'swiftpm': 'swift-3.0-preview-1-branch',
64+
'swift-corelibs-xctest': 'swift-3.0-preview-1-branch',
65+
'swift-corelibs-foundation': 'swift-3.0-preview-1-branch',
66+
'swift-corelibs-libdispatch': 'swift-3.0-preview-1-branch',
67+
'swift-integration-tests': 'swift-3.0-preview-1-branch',
68+
'compiler-rt': 'swift-3.0-branch',
69+
}
5670

5771
def update_working_copy(repo_path, branch):
5872
if not os.path.isdir(repo_path):
@@ -97,6 +111,9 @@ def obtain_additional_swift_sources(
97111
if branch:
98112
if branch == "stable-next" or branch == "master-next":
99113
repo_branch = NEXT_BRANCHES[dir_name]
114+
elif branch == "swift-3.0-branch" or \
115+
branch == "swift-3.0-preview-1-branch":
116+
repo_branch = SWIFT_3_0_PREVIEW_1_BRANCHES[dir_name]
100117
else:
101118
repo_branch = branch
102119
src_path = SWIFT_SOURCE_ROOT + "/" + dir_name + "/" + \
@@ -153,6 +170,9 @@ By default, updates your checkouts of Swift, SourceKit, LLDB, and SwiftPM.""")
153170
if branch:
154171
if branch == "stable-next" or branch == "master-next":
155172
repo_branch = NEXT_BRANCHES[dir_name]
173+
elif branch == "swift-3.0-branch" or \
174+
branch == "swift-3.0-preview-1-branch":
175+
repo_branch = SWIFT_3_0_PREVIEW_1_BRANCHES[dir_name]
156176

157177
update_working_copy(os.path.join(SWIFT_SOURCE_ROOT, dir_name),
158178
repo_branch)

0 commit comments

Comments
 (0)