415e86c465
Add a command to print a list of the names of deliverables that match specified criteria, like having a certain release. Change-Id: I52844446e288513b0a575c922a83d72f803f9f17 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
17 lines
499 B
Python
17 lines
499 B
Python
import os
|
|
import os.path
|
|
|
|
# Try to guess where the deliverables directory is relative to where
|
|
# the code is imported from.
|
|
_venv = os.environ.get('VIRTUAL_ENV', '')
|
|
if _venv:
|
|
deliverable_dir = os.path.dirname(_venv)
|
|
if deliverable_dir.endswith('.tox'):
|
|
deliverable_dir = os.path.dirname(deliverable_dir)
|
|
deliverable_dir = os.path.join(deliverable_dir, 'deliverables')
|
|
else:
|
|
deliverable_dir = os.path.join(
|
|
os.path.dirname(__file__),
|
|
'../deliverables',
|
|
)
|