Skip to content

Commit 7bfb546

Browse files
authored
Merge branch 'generate-sbom' into version-flag-msi
2 parents c3e3834 + 129da0f commit 7bfb546

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
build/dfetch-package/*.rpm
9494
build/dfetch-package/*.pkg
9595
build/dfetch-package/*.msi
96-
*.cdx.json
96+
build/dfetch-package/*.cdx.json
9797
9898
test-binary:
9999
name: test binary

script/create_sbom.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
logging.basicConfig(level=logging.INFO)
1414

1515
PROJECT_DIR = Path(__file__).parent.parent.resolve()
16-
OUTPUT_FILE = PROJECT_DIR / f"dfetch-{__version__}.{sys.platform}.cdx.json"
16+
OUTPUT_FILE = (
17+
PROJECT_DIR
18+
/ "build"
19+
/ "dfetch-package"
20+
/ f"dfetch-{__version__}.{sys.platform}.cdx.json"
21+
)
1722

1823
DEPS = f"{PROJECT_DIR}[sbom]"
1924

@@ -35,6 +40,7 @@ def temporary_venv():
3540

3641

3742
with temporary_venv() as python:
43+
OUTPUT_FILE.parent.mkdir(parents=True, exist_ok=True)
3844
subprocess.check_call([python, "-m", "pip", "install", DEPS]) # nosec
3945
subprocess.check_call( # nosec
4046
[python, "-m", "cyclonedx_py", "environment", "-o", str(OUTPUT_FILE)]

0 commit comments

Comments
 (0)