Skip to content

Commit 6c38ad1

Browse files
authored
Merge pull request #459 from apple/update-the-branch-name
Update the scripts to use main branch
2 parents de829eb + 6ffcced commit 6c38ad1

File tree

6 files changed

+47
-47
lines changed

6 files changed

+47
-47
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,13 @@ To build all projects against a specified Swift compiler locally, use the
244244
`runner.py` utility as shown below.
245245

246246
~~~bash
247-
./runner.py --swift-branch master --projects projects.json --include-actions 'action.startswith("Build")' --swiftc path/to/swiftc
247+
./runner.py --swift-branch main --projects projects.json --include-actions 'action.startswith("Build")' --swiftc path/to/swiftc
248248
~~~
249249

250250
Use the `--include-repos` flag to build a specific project.
251251

252252
~~~bash
253-
./runner.py --swift-branch master --projects projects.json --include-actions 'action.startswith("Build")' --include-repos 'path == "Alamofire"' --swiftc path/to/swiftc
253+
./runner.py --swift-branch main --projects projects.json --include-actions 'action.startswith("Build")' --include-repos 'path == "Alamofire"' --swiftc path/to/swiftc
254254
~~~
255255

256256
By default, build output is redirected to per-action `.log` files in the current
@@ -266,7 +266,7 @@ visible.
266266
To mark an action as an expected failure, add an `xfail` entry for the correct
267267
Swift version and branch to the failing actions, associating each with a link
268268
to a JIRA issue reporting the relevant failure. The following is an example of
269-
an action that's XFAIL'd when building against Swift master branch in 4.2
269+
an action that's XFAIL'd when building against Swift main branch in 4.2
270270
compatibility mode.
271271

272272
~~~json
@@ -295,7 +295,7 @@ compatibility mode.
295295
"xfail": {
296296
"issue": "https://bugs.swift.org/browse/SR-9999",
297297
"compatibility": "4.2",
298-
"branch": "master"
298+
"branch": "main"
299299
}
300300
}
301301
]
@@ -314,7 +314,7 @@ configurations. The currently supported fields for XFAIL entries are:
314314

315315
Values can either be a single string literal or a list of alternative string
316316
literals to match against. For example the below action is expected to fail on
317-
both master and swift-5.1-branch in both 4.0 and 5.1 compatibility modes:
317+
both main and swift-5.1-branch in both 4.0 and 5.1 compatibility modes:
318318

319319
~~~json
320320
...
@@ -327,7 +327,7 @@ both master and swift-5.1-branch in both 4.0 and 5.1 compatibility modes:
327327
"xfail": {
328328
"issue": "https://bugs.swift.org/browse/SR-9999",
329329
"compatibility": ["4.0", "5.1"],
330-
"branch": ["master", "swift-5.1-branch"]
330+
"branch": ["main", "swift-5.1-branch"]
331331
}
332332
}
333333
...
@@ -341,7 +341,7 @@ be reported. In the below example any failure on Linux would be reported as
341341
using a toolchain built from the *master* branch and *SR-9999* using a
342342
toolchain built from *swift-5.1-branch*. If the entries were in the reverse
343343
order, *SR-7777* would only be reported for Linux failures with toolchains built
344-
from a branch other than *master* or *swift-5.1-branch*.
344+
from a branch other than *main* or *swift-5.1-branch*.
345345

346346
~~~json
347347
...
@@ -358,7 +358,7 @@ from a branch other than *master* or *swift-5.1-branch*.
358358
},
359359
{
360360
"issue": "https://bugs.swift.org/browse/SR-8888",
361-
"branch": "master"
361+
"branch": "main"
362362
},
363363
{
364364
"issue": "https://bugs.swift.org/browse/SR-9999",

common.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@
7070
'swift-corelibs-foundation': 'swift-5.2-branch',
7171
'swift-corelibs-xctest': 'swift-5.2-branch',
7272
'swift-argument-parser': '0.3.0',
73-
'swift-driver': 'master',
73+
'swift-driver': 'main',
7474
'yams': '3.0.1',
7575
},
7676
'swift-4.2-branch': {
7777
'llvm-project': 'swift/swift-4.2-branch',
7878
'swift': 'swift-4.2-branch',
79-
'cmark': 'master',
79+
'cmark': 'main',
8080
'ninja': 'release',
81-
'llbuild': 'master',
81+
'llbuild': 'main',
8282
'swiftpm': 'swift-4.2-branch',
8383
'swift-corelibs-libdispatch': 'swift-4.2-branch',
8484
'swift-corelibs-foundation': 'swift-4.2-branch',
@@ -110,7 +110,7 @@
110110
'swift-4.0-branch': {
111111
'llvm-project': 'swift/swift-4.0-branch',
112112
'swift': 'swift-4.0-branch',
113-
'cmark': 'master',
113+
'cmark': 'main',
114114
'ninja': 'release',
115115
'llbuild': 'swift-4.0-branch',
116116
'swiftpm': 'swift-4.0-branch',
@@ -132,7 +132,7 @@
132132
'swift-3.1-branch': {
133133
'llvm-project': 'swift/swift-3.1-branch',
134134
'swift': 'swift-3.1-branch',
135-
'cmark': 'master',
135+
'cmark': 'main',
136136
'ninja': 'release',
137137
'llbuild': 'swift-3.1-branch',
138138
'swiftpm': 'swift-3.1-branch',
@@ -143,19 +143,19 @@
143143
'swift-3.0-branch': {
144144
'llvm-project': 'swift/swift-3.0-branch',
145145
'swift': 'swift-3.0-branch',
146-
'cmark': 'master',
146+
'cmark': 'main',
147147
'ninja': 'release',
148148
},
149149
}
150150

151151
swiftc_operation = {
152-
'master': '-typecheck',
152+
'main': '-typecheck',
153153
'swift-3.1-branch': '-typecheck',
154154
'swift-3.0-branch': '-parse',
155155
}
156156

157157
swiftc_version = {
158-
'master': '3',
158+
'main': '3',
159159
'swift-3.1-branch': '3',
160160
'swift-3.0-branch': None,
161161
}
@@ -166,7 +166,7 @@
166166
def set_swift_branch(branch):
167167
"""Configure the common library for a specific branch.
168168
169-
>>> set_swift_branch('master')
169+
>>> set_swift_branch('main')
170170
"""
171171
global swift_branch
172172
swift_branch = branch
@@ -182,7 +182,7 @@ def clone_repos():
182182
"""Clone Swift and dependencies in parallel.
183183
184184
>>> import tempfile
185-
>>> set_swift_branch('master')
185+
>>> set_swift_branch('main')
186186
>>> tmpdir = tempfile.mkdtemp()
187187
>>> with DirectoryContext(tmpdir):
188188
... clone_repos()

project.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
def set_swift_branch(branch):
3838
"""Configure the library for a specific branch.
3939
40-
>>> set_swift_branch('master')
40+
>>> set_swift_branch('main')
4141
"""
4242
global swift_branch
4343
swift_branch = branch
@@ -449,7 +449,7 @@ def add_arguments(parser):
449449
parser.add_argument('--swift-branch',
450450
metavar='BRANCH',
451451
help='Swift branch configuration to use',
452-
default='master')
452+
default='main')
453453
parser.add_argument('--sandbox-profile-xcodebuild',
454454
metavar='FILE',
455455
help='sandbox xcodebuild build and test operations '
@@ -530,7 +530,7 @@ def add_minimal_arguments(parser):
530530
parser.add_argument('--swift-branch',
531531
metavar='BRANCH',
532532
help='Swift branch configuration to use',
533-
default='master')
533+
default='main')
534534

535535

536536
def evaluate_predicate(element, predicate):

project_future.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
def set_swift_branch(branch):
3939
"""Configure the library for a specific branch.
4040
41-
>>> set_swift_branch('master')
41+
>>> set_swift_branch('main')
4242
"""
4343
global swift_branch
4444
swift_branch = branch
@@ -502,7 +502,7 @@ def add_arguments(parser):
502502
parser.add_argument('--swift-branch',
503503
metavar='BRANCH',
504504
help='Swift branch configuration to use',
505-
default='master')
505+
default='main')
506506
parser.add_argument('--sandbox-profile-xcodebuild',
507507
metavar='FILE',
508508
help='sandbox xcodebuild build and test operations '
@@ -610,7 +610,7 @@ def add_minimal_arguments(parser):
610610
parser.add_argument('--swift-branch',
611611
metavar='BRANCH',
612612
help='Swift branch configuration to use',
613-
default='master')
613+
default='main')
614614

615615

616616
def evaluate_predicate(element, predicate):

projects.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{
2727
"issue": "https://bugs.swift.org/browse/SR-13197",
2828
"compatibility": "5.1",
29-
"branch": "master",
29+
"branch": "main",
3030
"configuration": "debug"
3131
},
3232
{
@@ -291,7 +291,7 @@
291291
{
292292
"issue": "rdar://problem/68590340",
293293
"compatibility": ["4.2", "5.0", "5.1"],
294-
"branch": "master",
294+
"branch": "main",
295295
"configuration": "debug"
296296
}
297297
]
@@ -818,7 +818,7 @@
818818
"xfail": {
819819
"issue": "https://bugs.swift.org/browse/SR-13189",
820820
"compatibility": ["5.0", "4.2"],
821-
"branch": "master"
821+
"branch": "main"
822822
}
823823
}
824824
]
@@ -885,7 +885,7 @@
885885
"xfail": {
886886
"issue": "https://bugs.swift.org/browse/SR-8250",
887887
"compatibility": "4.0",
888-
"branch": ["master", "swift-5.0-branch", "swift-5.1-branch", "swift-5.2-branch"]
888+
"branch": ["main", "swift-5.0-branch", "swift-5.1-branch", "swift-5.2-branch"]
889889
}
890890
},
891891
{
@@ -1241,7 +1241,7 @@
12411241
"xfail": {
12421242
"issue": "https://bugs.swift.org/browse/SR-13189",
12431243
"compatibility": ["4.0", "5.1"],
1244-
"branch": "master"
1244+
"branch": "main"
12451245
}
12461246
}
12471247
]
@@ -1427,7 +1427,7 @@
14271427
"xfail": {
14281428
"issue": "https://bugs.swift.org/browse/SR-13189",
14291429
"compatibility": "5.1",
1430-
"branch": "master"
1430+
"branch": "main"
14311431
}
14321432
},
14331433
{
@@ -2087,7 +2087,7 @@
20872087
{
20882088
"issue": "rdar://problem/68590422",
20892089
"compatibility": ["4.0", "5.1"],
2090-
"branch": "master",
2090+
"branch": "main",
20912091
"configuration": "debug"
20922092
}
20932093
]
@@ -2102,7 +2102,7 @@
21022102
{
21032103
"issue": "rdar://problem/68590422",
21042104
"compatibility": ["4.0", "5.1"],
2105-
"branch": "master",
2105+
"branch": "main",
21062106
"configuration": "debug"
21072107
}
21082108
]
@@ -2380,7 +2380,7 @@
23802380
"xfail": {
23812381
"issue": "https://bugs.swift.org/browse/SR-11141",
23822382
"compatibility": "5.1",
2383-
"branch": ["master", "swift-5.2-branch", "release/5.3"]
2383+
"branch": ["main", "swift-5.2-branch", "release/5.3"]
23842384
}
23852385
},
23862386
{
@@ -2485,12 +2485,12 @@
24852485
{
24862486
"issue": "https://bugs.swift.org/browse/SR-13190",
24872487
"compatibility": "5.1",
2488-
"branch": "master"
2488+
"branch": "main"
24892489
},
24902490
{
24912491
"issue": "https://bugs.swift.org/browse/SR-13189",
24922492
"compatibility": "4.0",
2493-
"branch": "master"
2493+
"branch": "main"
24942494
}
24952495
]
24962496
},
@@ -2554,7 +2554,7 @@
25542554
"xfail": {
25552555
"issue": "https://bugs.swift.org/browse/SR-13189",
25562556
"compatibility": "5.1",
2557-
"branch": "master"
2557+
"branch": "main"
25582558
}
25592559
},
25602560
{
@@ -2795,7 +2795,7 @@
27952795
"xfail": {
27962796
"issue": "https://bugs.swift.org/browse/SR-13189",
27972797
"compatibility": ["5.1", "5.0", "4.2", "4.0"],
2798-
"branch": "master"
2798+
"branch": "main"
27992799
}
28002800
},
28012801
{
@@ -3479,7 +3479,7 @@
34793479
"xfail": {
34803480
"issue": "https://bugs.swift.org/browse/SR-13189",
34813481
"compatibility": "5.1",
3482-
"branch": "master"
3482+
"branch": "main"
34833483
}
34843484
},
34853485
{
@@ -3519,7 +3519,7 @@
35193519
"xfail": {
35203520
"issue": "https://bugs.swift.org/browse/SR-13189",
35213521
"compatibility": ["5.0", "4.2"],
3522-
"branch": "master"
3522+
"branch": "main"
35233523
}
35243524
}
35253525
]
@@ -3584,7 +3584,7 @@
35843584
"xfail": {
35853585
"issue": "https://bugs.swift.org/browse/SR-13189",
35863586
"compatibility": ["5.0", "4.2"],
3587-
"branch": "master"
3587+
"branch": "main"
35883588
}
35893589
}
35903590
]
@@ -3621,7 +3621,7 @@
36213621
"xfail": {
36223622
"issue": "https://bugs.swift.org/browse/SR-13189",
36233623
"compatibility": ["5.1", "5.0", "4.2"],
3624-
"branch": "master"
3624+
"branch": "main"
36253625
}
36263626
}
36273627
]
@@ -3658,7 +3658,7 @@
36583658
"xfail": {
36593659
"issue": "https://bugs.swift.org/browse/SR-13189",
36603660
"compatibility": ["5.0", "4.2"],
3661-
"branch": "master"
3661+
"branch": "main"
36623662
}
36633663
}
36643664
]
@@ -3695,7 +3695,7 @@
36953695
"xfail": {
36963696
"issue": "https://bugs.swift.org/browse/SR-13189",
36973697
"compatibility": ["5.0", "4.2"],
3698-
"branch": "master"
3698+
"branch": "main"
36993699
}
37003700
}
37013701
]
@@ -3732,7 +3732,7 @@
37323732
"xfail": {
37333733
"issue": "https://bugs.swift.org/browse/SR-13189",
37343734
"compatibility": ["5.1", "5.0", "4.2"],
3735-
"branch": "master"
3735+
"branch": "main"
37363736
}
37373737
}
37383738
]

reproduce.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
"""Easily reproduce project compatibility failures.
1515
1616
Usage:
17-
# Build master Swift and execute all Alamofire build targets
18-
./reproduce.py master --project-path Alamofire
17+
# Build main Swift and execute all Alamofire build targets
18+
./reproduce.py main --project-path Alamofire
1919
2020
# Execute all Alamofire build targets using existing Swift
21-
./reproduce.py master --project-path Alamofire --swiftc path/to/swiftc
21+
./reproduce.py main --project-path Alamofire --swiftc path/to/swiftc
2222
"""
2323

2424
import argparse

0 commit comments

Comments
 (0)