diff --git a/scripts/build.sh b/scripts/build.sh index 407cc2b..be2837a 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,11 +1,11 @@ #!/bin/sh -VERSION=$(grep -o "__version__.*" socketsync/__init__.py | awk '{print $3}' | tr -d "'" | tr -d '\r' | tr -dc '[:alnum:]\.' ) +VERSION=$(grep "^__version__" socketsync/__init__.py | cut -d'"' -f2) ENABLE_PYPI_BUILD=$1 if [ -z $ENABLE_PYPI_BUILD ]; then echo "$0 pypi-prod=enable" - printf "\tpypi-build: Build and publish a new version of the package to pypi. If disabled will push to test pypi" + printf "\tpypi-build: Build and publish a new version $VERSION of the package to pypi. If disabled will push to test pypi" exit fi @@ -17,6 +17,5 @@ else echo "Doing test build of version $VERSION" python -m build --wheel --sdist \ && ls dist/*$VERSION*\ - && twine upload --repository testpypi "dist/*$VERSION*" + && twine upload --repository testpypi dist/*$VERSION* fi - diff --git a/socketsync/__init__.py b/socketsync/__init__.py index 9210502..7a04581 100644 --- a/socketsync/__init__.py +++ b/socketsync/__init__.py @@ -1,14 +1,9 @@ import logging -__author__ = 'socket.dev' -__version__ = '1.0.15' -__all__ = [ - "log", - "__version__", - "columns", - "default_headers" -] +__author__ = "socket.dev" +__version__ = "1.0.16" +__all__ = ["log", "__version__", "columns", "default_headers"] log = logging.getLogger("socketdev") log.addHandler(logging.NullHandler()) @@ -28,11 +23,11 @@ "pr", "commit", "created_at", - "action" + "action", ] default_headers = { - 'User-Agent': f'SocketSIEMTool/{__version__}', + "User-Agent": f"SocketSIEMTool/{__version__}", "accept": "application/json", - 'Content-Type': "application/json" -} \ No newline at end of file + "Content-Type": "application/json", +}