diff --git a/.version b/.version new file mode 100644 index 0000000..9cb4db9 --- /dev/null +++ b/.version @@ -0,0 +1 @@ +v1.1.1 \ No newline at end of file diff --git a/bin/deploy_pip.sh b/bin/deploy_pip.sh index 529fbb1..2a7f1c7 100755 --- a/bin/deploy_pip.sh +++ b/bin/deploy_pip.sh @@ -4,7 +4,11 @@ WK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $WK_DIR cd .. -sh bin/clean/sh +sh bin/clean.sh python setup.py sdist bdist_wheel + +git tag $(cat .version) +git push -u origin $(cat .version) + twine upload dist/* \ No newline at end of file diff --git a/bin/recreate_init.py b/bin/recreate_init.py index 696f1e7..fd5f429 100644 --- a/bin/recreate_init.py +++ b/bin/recreate_init.py @@ -27,3 +27,7 @@ def update_pdfmajor__init___(version: str, doc: str): long_description=doc, version_tuple=re.sub(r"\.", ", ", version, count=2) )) + +def update_current_version_lock(version: str): + with open(".version", 'w') as file: + file.write("v"+version) diff --git a/setup.py b/setup.py index a3c2f64..3651b7d 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ import sys with open('README.md') as readme_file: SETUP = { "name": "pdfmajor", - "version": "1.1.1", + "version": "1.1.2", "packages": find_packages(include=['pdfmajor*']), "install_requires": [ 'pycryptodome', @@ -46,8 +46,9 @@ with open('README.md') as readme_file: # ============== # Update __init__.py # ============== -from bin.recreate_init import update_pdfmajor__init___ +from bin.recreate_init import update_pdfmajor__init___, update_current_version_lock update_pdfmajor__init___(SETUP["version"], SETUP["long_description"]) +update_current_version_lock(SETUP["version"]) # ============== # Run Setup