Skip to content

Commit 92f4306

Browse files
authored
Doug/fix docker build process (#69)
Fixed build process and topLevelAncestor error
1 parent 7198230 commit 92f4306

File tree

7 files changed

+23
-19
lines changed

7 files changed

+23
-19
lines changed

Diff for: pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
66

77
[project]
88
name = "socketsecurity"
9-
version = "2.0.36"
9+
version = "2.0.38"
1010
requires-python = ">= 3.10"
1111
license = {"file" = "LICENSE"}
1212
dependencies = [
@@ -16,7 +16,7 @@ dependencies = [
1616
'GitPython',
1717
'packaging',
1818
'python-dotenv',
19-
'socket-sdk-python>=2.0.15'
19+
'socket-sdk-python>=2.0.20'
2020
]
2121
readme = "README.md"
2222
description = "Socket Security CLI for CI/CD"

Diff for: scripts/build_container.sh

+14-14
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@ fi
3232

3333
if [ $ENABLE_PYPI_BUILD = "pypi-build=prod" ]; then
3434
echo "Doing production build"
35-
if ! python -m build --wheel --sdist; then
36-
echo "Build failed"
37-
exit 1
38-
fi
39-
40-
if ! twine upload dist/*$VERSION*; then
41-
echo "Upload to PyPI failed"
42-
exit 1
43-
fi
44-
45-
if ! verify_package $VERSION "https://pypi.org/simple"; then
46-
echo "Failed to verify package on PyPI"
47-
exit 1
48-
fi
35+
# if ! python -m build --wheel --sdist; then
36+
# echo "Build failed"
37+
# exit 1
38+
# fi
39+
#
40+
# if ! twine upload dist/*$VERSION*; then
41+
# echo "Upload to PyPI failed"
42+
# exit 1
43+
# fi
44+
#
45+
# if ! verify_package $VERSION "https://pypi.org/simple"; then
46+
# echo "Failed to verify package on PyPI"
47+
# exit 1
48+
# fi
4949

5050
docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:$VERSION . \
5151
&& docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:latest . \

Diff for: socketsecurity/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__author__ = 'socket.dev'
2-
__version__ = '2.0.36'
2+
__version__ = '2.0.38'
33

Diff for: socketsecurity/config.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import os
33
from dataclasses import asdict, dataclass
44
from typing import List, Optional
5-
from socketdev import __version__
6-
5+
from socketsecurity import __version__
76
from socketdev import INTEGRATION_TYPES, IntegrationType
87

98

Diff for: socketsecurity/core/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,8 @@ def get_source_data(package: Package, packages: dict) -> list:
736736
source = ("direct", manifests)
737737
introduced_by.append(source)
738738
else:
739+
if not package.topLevelAncestors:
740+
return introduced_by
739741
for top_id in package.topLevelAncestors:
740742
top_package = packages.get(top_id)
741743
if top_package:

Diff for: socketsecurity/core/socket_config.py

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import os
66

77
from socketsecurity.core.issues import AllIssues
8+
from socketsecurity import __version__
89

910

1011
default_exclude_dirs = {
@@ -27,6 +28,7 @@ class SocketConfig:
2728
security_policy: Dict = None
2829
all_issues: Optional['AllIssues'] = None
2930
excluded_dirs: Set[str] = field(default_factory=lambda: default_exclude_dirs)
31+
version: str = __version__
3032

3133
def __post_init__(self):
3234
"""Validate configuration after initialization"""

Diff for: socketsecurity/socketcli.py

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def cli():
4545

4646
def main_code():
4747
config = CliConfig.from_args()
48+
log.info(f"Starting Socket Security CLI version {config.version}")
4849
log.debug(f"config: {config.to_dict()}")
4950
output_handler = OutputHandler(config)
5051

0 commit comments

Comments
 (0)