diff --git a/CHANGELOG.md b/CHANGELOG.md index a611ef4..f711ff6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 1.4.4 + +updated dependency ranges + +updated set version script and documentation + ## 1.4.3 fixed tests for earlier versions of python diff --git a/README.md b/README.md index 96d756d..e6b65ab 100644 --- a/README.md +++ b/README.md @@ -294,7 +294,7 @@ The tests are not complete, and need to be expanded. Feel free to open an issue or pull request. If you are opening a pull request, please make sure to run the tests and ensure that the coverage does not decrease, and any new code is covered by tests. -Remember to update the [changelog](https://github.com/cc-d/open2fa/blob/main/CHANGELOG.md) with any changes and to update the version in `open2fa/version.py` and `pyproject.toml` (can use the `set_version.py` script). +Remember to update the [changelog](https://github.com/cc-d/open2fa/blob/main/CHANGELOG.md) with any changes and to update the version in `open2fa/version.py` and `pyproject.toml` (can use the `set_version.sh` script). ## License diff --git a/open2fa/version.py b/open2fa/version.py index aa56ed4..9e0feee 100644 --- a/open2fa/version.py +++ b/open2fa/version.py @@ -1 +1 @@ -__version__ = "1.4.3" +__version__ = '1.4.4' diff --git a/pyproject.toml b/pyproject.toml index 83990e2..ac97c58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ target-version = ['py37'] [project] name = "open2fa" -version = "1.4.3" +version = '1.4.4' authors = [ { name="Cary Carter", email="ccarterdev@gmail.com" }, ] @@ -38,9 +38,9 @@ classifiers = [ ] dependencies = [ "requests", - "logfunc<3.0.0", - "cryptography<=41.0.7", - "pyshared<1.6.0", + "logfunc<3", + "cryptography<42, + "pyshared<2" "base58==2.1.1", ] diff --git a/requirements.txt b/requirements.txt index bfc7f48..1c651a1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ base58==2.1.1 -cryptography<=41.0.7 -logfunc>=2.6.0,<3 -pyshared<2,>=1.5.8 +cryptography<42 +logfunc<3 +pyshared<2 diff --git a/set_version.py b/set_version.py deleted file mode 100755 index ab884f0..0000000 --- a/set_version.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python3 -""" -Sets the version in both pyproject.toml and version.py to the same version. - -Usage: - ./set_version.py -""" -import sys -import os -import os.path as osp - -REPO_DIR = osp.dirname(osp.abspath(__file__)) -LIB_DIR = osp.join(REPO_DIR, 'open2fa') - - -def main(v: str): - """sets both pyproject.toml and version.py to the same version""" - with open(osp.join(LIB_DIR, 'version.py'), 'w') as f: - f.write('__version__ = "{}"\n'.format(v)) - print('Set version in version.py to', v) - with open(osp.join(REPO_DIR, 'pyproject.toml'), 'r') as f: - lines = f.readlines() - for i, line in enumerate(lines): - if line.startswith('version = "'): - lines[i] = 'version = "{}"\n'.format(v) - break - with open(osp.join(REPO_DIR, 'pyproject.toml'), 'w') as f: - f.writelines(lines) - print('Set version in pyproject.toml to', v) - - -if __name__ == '__main__': - from open2fa.version import __version__ as _v - - cv = str(_v) - - print('Current version:', cv) - v = input('Enter new version: ').strip() - - print('New version:', v) - main(v) diff --git a/set_version.sh b/set_version.sh new file mode 100755 index 0000000..fdddb3f --- /dev/null +++ b/set_version.sh @@ -0,0 +1,25 @@ +#!/bin/sh +set -e + +SET_VER_DIR=$(cd "$(dirname $0)" && pwd) + +echo "Using DIR: $SET_VER_DIR" + +SET_VER_PY=$(find "$SET_VER_DIR" -name "version.py" -maxdepth 5 | head -n 1) +SET_VER_PROJ=$(find "$SET_VER_DIR" -name "pyproject.toml" -maxdepth 5 | head -n 1) + +SET_VER_CURVER=$(cat "$SET_VER_PY" | grep -oE "= [\"'].*[\"']" | tr -d "'\"= ") + +echo "version.py: $SET_VER_PY" +echo "pyproject.toml: $SET_VER_PROJ" +echo "Current version: $SET_VER_CURVER" + +read -p "Enter New Version: " SET_VER_NEWVER + +echo "Setting new version to: $SET_VER_NEWVER" + +echo "Setting version in $SET_VER_PY" +echo "__version__ = '$SET_VER_NEWVER'" > "$SET_VER_PY" + +echo "Setting version in $SET_VER_PROJ" +sed -E -i '' "s/^version = .*$/version = '$SET_VER_NEWVER'/" "$SET_VER_PROJ"