Skip to content

Commit

Permalink
updated actions & next version utility for incrementing semantic version
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Jamison (Codemation) committed Sep 27, 2021
1 parent fcaf1df commit 7d1ccb1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ jobs:
- name: Package & Test PyPI Installation
run: |
export NEXT_VERSION=0.0.1
#export NEXT_VERSION=$(pip -qqq download pydbantic && ls pydbantic*.whl | sed 's/-/" "/g' | awk '{print "(" $2 ")"}' | python nextbuild.py)
#sed -i 's/NEXT_VERSION/'$NEXT_VERSION'/g' setup.py
export NEXT_VERSION=$(pip -qqq download pydbantic && ls pydbantic*.whl | sed 's/-/" "/g' | awk '{print "(" $2 ")"}' | python nextbuild.py)
sed -i 's/NEXT_VERSION/'$NEXT_VERSION'/g' setup.py
python setup.py bdist_wheel
export PYQL_PACKAGE=$(pwd)/dist/pydbantic-$NEXT_VERSION-py3-none-any.whl
pip install $(echo -n $PYQL_PACKAGE)
Expand All @@ -114,6 +113,5 @@ jobs:
env: # Or as an environment variable
PYPI: ${{ secrets.PYPI }}
run: |
export NEXT_VERSION=0.0.1
#export NEXT_VERSION=$(pip -qqq download pydbantic && ls pydbantic*.whl | sed 's/-/" "/g' | awk '{print "(" $2 ")"}' | python nextbuild.py)
export NEXT_VERSION=$(pip -qqq download pydbantic && ls pydbantic*.whl | sed 's/-/" "/g' | awk '{print "(" $2 ")"}' | python nextbuild.py)
python -m twine upload $(pwd)/dist/pydbantic-$NEXT_VERSION-py3-none-any.whl -u codemation -p $PYPI
2 changes: 1 addition & 1 deletion nextbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
version = sys.stdin.readline().rstrip()
if '(' in version and ')' in version:
version = version[2:7]
print(f"{float(version)+0.001:.3f}")
print(f"{version[:-1]}{int(version[-1])+1}")
4 changes: 2 additions & 2 deletions pydbantic/database.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import asyncio
import time
import asyncio
import sqlalchemy
from pickle import dumps
from typing import List
Expand Down Expand Up @@ -287,7 +287,7 @@ async def fetch(self, query, table_name, values=None):
if cached_row:
self.log.debug(f"cache used - {cached_row}")
return cached_row

self.log.debug(f"running query: {query} with {values}")
row = await self.database.fetch_all(query=query)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
long_description = fh.read()
setuptools.setup(
name='pydbantic',
version='0.0.1',
version='NEXT_VERSION',
packages=setuptools.find_packages(include=['pydbantic'], exclude=['build']),
author="Joshua Jamison",
author_email="[email protected]",
Expand Down

0 comments on commit 7d1ccb1

Please sign in to comment.