@@ -39,12 +39,12 @@ def generate_basic_project(path):
39
39
CIService (
40
40
name = "appveyor" ,
41
41
dst_config_path = "appveyor.yml" ,
42
- badge_md = "[](https://ci.appveyor.com/project/pypa /cibuildwheel/branch/{branch})" ,
42
+ badge_md = "[](https://ci.appveyor.com/project/joerick /cibuildwheel/branch/{branch})" ,
43
43
),
44
44
CIService (
45
45
name = "azure-pipelines" ,
46
46
dst_config_path = "azure-pipelines.yml" ,
47
- badge_md = "[](https://dev.azure.com/joerick0429/cibuildwheel/_build/latest?definitionId=2&branchName={branch})" ,
47
+ badge_md = "[](https://dev.azure.com/joerick0429/cibuildwheel/_build/latest?definitionId=2&branchName={branch})" ,
48
48
),
49
49
CIService (
50
50
name = "circleci" ,
@@ -59,12 +59,12 @@ def generate_basic_project(path):
59
59
CIService (
60
60
name = "travis-ci" ,
61
61
dst_config_path = ".travis.yml" ,
62
- badge_md = "[](https://travis-ci.org /pypa/cibuildwheel)" ,
62
+ badge_md = "[](https://app. travis-ci.com /pypa/cibuildwheel)" ,
63
63
),
64
64
CIService (
65
65
name = "gitlab" ,
66
66
dst_config_path = ".gitlab-ci.yml" ,
67
- badge_md = "[](https://gitlab.com/pypa /cibuildwheel/-/commits/{branch})" ,
67
+ badge_md = "[](https://gitlab.com/joerick /cibuildwheel/-/commits/{branch})" ,
68
68
),
69
69
CIService (
70
70
name = "cirrus-ci" ,
@@ -75,14 +75,13 @@ def generate_basic_project(path):
75
75
76
76
77
77
def ci_service_for_config_file (config_file ):
78
- service_name = Path (config_file ).name . rsplit ( "-" , 1 )[ 0 ]
78
+ filename = Path (config_file ).name
79
79
80
- for service in services :
81
- if service .name == service_name :
82
- return service
83
-
84
- msg = f"unknown ci service for config file { config_file } "
85
- raise ValueError (msg )
80
+ try :
81
+ return next (s for s in services if filename .startswith (s .name ))
82
+ except StopIteration :
83
+ msg = f"unknown ci service for config file { config_file } "
84
+ raise ValueError (msg ) from None
86
85
87
86
88
87
@click .command ()
0 commit comments