From 860773ea9087d2aaf633025a7e531955f8ba12e2 Mon Sep 17 00:00:00 2001 From: IamLizu Date: Mon, 3 Jul 2023 12:46:47 +0600 Subject: [PATCH 1/3] fixes #31 --- wpdetect/__main__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wpdetect/__main__.py b/wpdetect/__main__.py index ef70b1a..3fda87f 100644 --- a/wpdetect/__main__.py +++ b/wpdetect/__main__.py @@ -4,7 +4,6 @@ ''' import sys -import os import urllib.request from urllib.parse import urlparse import toml @@ -33,9 +32,8 @@ def get_package_version(): """Returns the version of the package.""" - file_path = os.path.join(os.path.dirname(__file__), '..', 'pyproject.toml') - - with open(file_path, 'r', encoding="utf-8") as pyproject_toml_file: + # using absolute path to open the file because of the issue: #31 + with open('pyproject.toml', 'r', encoding="utf-8") as pyproject_toml_file: config = toml.load(pyproject_toml_file) return config['project']['version'] From 0811edfe855c779f266d2dadc5fc213ba950614c Mon Sep 17 00:00:00 2001 From: IamLizu Date: Mon, 3 Jul 2023 12:47:14 +0600 Subject: [PATCH 2/3] added locally installing script --- install-local.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 install-local.sh diff --git a/install-local.sh b/install-local.sh new file mode 100755 index 0000000..ba2ad66 --- /dev/null +++ b/install-local.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +< Date: Mon, 3 Jul 2023 12:47:34 +0600 Subject: [PATCH 3/3] added description in release script --- .vscode/settings.json | 4 ++-- release-tag.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 0116d58..537bfbd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,8 @@ { "[python]": { "editor.defaultFormatter": "ms-python.autopep8", - "editor.formatOnSave": true, + "editor.formatOnSave": true }, "python.formatting.provider": "autopep8", - "cSpell.words": ["figlet", "KHTML", "pyfiglet"] + "cSpell.words": ["figlet", "KHTML", "pyfiglet", "wpdetect"] } diff --git a/release-tag.sh b/release-tag.sh index c764902..321f6e8 100755 --- a/release-tag.sh +++ b/release-tag.sh @@ -1,5 +1,7 @@ #!/bin/sh +# This script is used to tag a release of the package. + echo "Running release-tag.sh" # Ensure we're on the master branch