Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 20 additions & 13 deletions scripts/build_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,39 @@ STABLE_VERSION=$2
echo $VERSION
if [ -z $ENABLE_PYPI_BUILD ] || [ -z $STABLE_VERSION ]; then
echo "$0 pypi-build=enable stable=true"
echo "\tpypi-build: Build and publish a new version of the package to pypi"
echo "\tpypi-build: Build and publish a new version of the package to pypi. Options are prod or test"
echo "\tstable: Only build and publish a new version for the stable docker tag if it has been tested and going on the changelog"
exit
fi

if [ $ENABLE_PYPI_BUILD = "pypi-build=enable" ]; then
if [ $ENABLE_PYPI_BUILD = "pypi-build=prod" ]; then
echo "Doing production build"
python -m build --wheel --sdist
twine upload dist/*$VERSION*
sleep 240
sleep 120
docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:$VERSION . \
&& docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:latest . \
&& docker push socketdev/cli:$VERSION \
&& docker push socketdev/cli:latest
if [ $STABLE_VERSION = "stable=true" ]; then
docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:stable . \
&& docker push socketdev/cli:stable
fi
else
fi

if [ $ENABLE_PYPI_BUILD = "pypi-build=test" ]; then
echo "Doing test build"
python -m build --wheel --sdist
twine upload --repository testpypi dist/*$VERSION*
# sleep 240
# docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:$VERSION . \
# && docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:latest . \
# && docker push socketdev/cli:$VERSION-test \
# && docker push socketdev/cli:test
sleep 120
docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:$VERSION . \
&& docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:latest . \
&& docker push socketdev/cli:$VERSION-test \
&& docker push socketdev/cli:test
fi


if [ $STABLE_VERSION = "stable=true" ]; then
if [ $ENABLE_PYPI_BUILD = "pypi-build=enable" ]; then
sleep 120
fi
docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:stable . \
&& docker push socketdev/cli:stable
fi

2 changes: 1 addition & 1 deletion socketsecurity/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__author__ = 'socket.dev'
__version__ = '1.0.31'
__version__ = '1.0.32'
13 changes: 13 additions & 0 deletions socketsecurity/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@
log.addHandler(logging.NullHandler())

socket_globs = {
"spdx": {
"spdx.json": {
"pattern": "*[-.]spdx.json"
}
},
"cdx": {
"cyclonedx.json": {
"pattern": "{bom,*[-.]c{yclone,}dx}.json"
},
"xml": {
"pattern": "{bom,*[-.]c{yclone,}dx}.xml"
}
},
"npm": {
"package.json": {
"pattern": "package.json"
Expand Down