Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
buildstream
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
BuildStream
buildstream
Commits
ab5d0d8e
Commit
ab5d0d8e
authored
6 years ago
by
James Ennis
Browse files
Options
Downloads
Patches
Plain Diff
cli.py: Remove _classify_artifacts() method
This method has been moved to Stream, where is it used there exclusively.
parent
4e253996
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
buildstream/_frontend/cli.py
+0
-33
0 additions, 33 deletions
buildstream/_frontend/cli.py
with
0 additions
and
33 deletions
buildstream/_frontend/cli.py
+
0
−
33
View file @
ab5d0d8e
import
os
import
sys
from
contextlib
import
ExitStack
from
fnmatch
import
fnmatch
from
functools
import
partial
from
tempfile
import
TemporaryDirectory
...
...
@@ -895,38 +894,6 @@ def workspace_list(app):
#############################################################
# Artifact Commands #
#############################################################
def
_classify_artifacts
(
names
,
cas
,
project_directory
):
element_targets
=
[]
artifact_refs
=
[]
element_globs
=
[]
artifact_globs
=
[]
for
name
in
names
:
if
name
.
endswith
(
'
.bst
'
):
if
any
(
c
in
"
*?[
"
for
c
in
name
):
element_globs
.
append
(
name
)
else
:
element_targets
.
append
(
name
)
else
:
if
any
(
c
in
"
*?[
"
for
c
in
name
):
artifact_globs
.
append
(
name
)
else
:
artifact_refs
.
append
(
name
)
if
element_globs
:
for
dirpath
,
_
,
filenames
in
os
.
walk
(
project_directory
):
for
filename
in
filenames
:
element_path
=
os
.
path
.
join
(
dirpath
,
filename
).
lstrip
(
project_directory
).
lstrip
(
'
/
'
)
if
any
(
fnmatch
(
element_path
,
glob
)
for
glob
in
element_globs
):
element_targets
.
append
(
element_path
)
if
artifact_globs
:
artifact_refs
.
extend
(
ref
for
ref
in
cas
.
list_refs
()
if
any
(
fnmatch
(
ref
,
glob
)
for
glob
in
artifact_globs
))
return
element_targets
,
artifact_refs
@cli.group
(
short_help
=
"
Manipulate cached artifacts
"
)
def
artifact
():
"""
Manipulate cached artifacts
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment