You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
help="Path to store the custom CodeQL bundle. Can be a directory or a non-existing archive ending with the extension '.tar.gz'",
33
+
help="Path to store the custom CodeQL bundle. Can be a directory or a non-existing archive ending with the extension '.tar.gz' if there is only a single bundle",
34
34
type=click.Path(path_type=Path),
35
35
)
36
36
@click.option(
@@ -49,12 +49,14 @@
49
49
),
50
50
default="WARNING",
51
51
)
52
+
@click.option("-p", "--platform", multiple=True, type=click.Choice(["linux64", "osx64", "win64"], case_sensitive=False), help="Target platform for the bundle")
52
53
@click.argument("packs", nargs=-1, required=True)
53
54
defmain(
54
55
bundle_path: Path,
55
56
output: Path,
56
57
workspace: Path,
57
58
loglevel: str,
59
+
platform: List[str],
58
60
packs: List[str],
59
61
) ->None:
60
62
@@ -73,15 +75,27 @@ def main(
73
75
workspace=workspace.parent
74
76
75
77
logger.info(
76
-
f"Creating custom bundle of {bundle_path} using CodeQL packs in workspace {workspace}"
78
+
f"Creating custom bundle of {bundle_path} using CodeQL pack(s) in workspace {workspace}"
f"The provided bundle supports the platform(s) {', '.join(map(str, bundle.platforms))}, but doesn't support the following platform(s): {', '.join(unsupported_platforms)}"
88
+
)
89
+
sys.exit(1)
90
+
81
91
logger.info(f"Looking for CodeQL packs in workspace {workspace}")
82
-
packs_in_workspace=bundle.getCodeQLPacks()
92
+
packs_in_workspace=bundle.get_workspace_packs()
83
93
logger.info(
84
-
f"Found the CodeQL packs: {','.join(map(lambdap: p.config.name, packs_in_workspace))}"
94
+
f"Found the CodeQL pack(s): {','.join(map(lambdap: p.config.name, packs_in_workspace))}"
95
+
)
96
+
97
+
logger.info(
98
+
f"Considering the following CodeQL pack(s) for inclusion in the custom bundle: {','.join(packs)}"
85
99
)
86
100
87
101
iflen(packs) >0:
@@ -93,23 +107,22 @@ def main(
93
107
else:
94
108
selected_packs=packs_in_workspace
95
109
96
-
logger.info(
97
-
f"Considering the following CodeQL packs for inclusion in the custom bundle: {','.join(map(lambdap: p.config.name, selected_packs))}"
raisePackResolverException(f"Could not resolve dependency {dep_name} for pack {pack_to_be_resolved.config.name}!")
105
+
raisePackResolverException(f"Could not resolve dependency {dep_name}@{dep_version} for pack {pack_to_be_resolved.config.name}@{str(pack_to_be_resolved.config.version)}!")
0 commit comments