Skip to content

Commit

Permalink
fixed build script and bumped the version (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
flowstate authored Nov 6, 2024
1 parent 945f872 commit 7c4c17d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
7 changes: 3 additions & 4 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

19 changes: 7 additions & 12 deletions socketsync/__init__.py
Original file line number Diff line number Diff line change
@@ -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())
Expand All @@ -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"
}
"Content-Type": "application/json",
}

0 comments on commit 7c4c17d

Please sign in to comment.