Skip to content

Commit

Permalink
Merge pull request #32 from IamLizu/patch/31
Browse files Browse the repository at this point in the history
Minor bug fixes
IamLizu authored Jul 3, 2023

Unverified

This user has not yet uploaded their public signing key.
2 parents a5ccd9e + 8ac1c1b commit ba51426
Showing 4 changed files with 23 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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"]
}
17 changes: 17 additions & 0 deletions install-local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

<<EOF
This script is used to install the package from source for testing purposes.
EOF

# Find the python executable
python_executable=$(which python)
if [ -z "$python_executable" ]; then
python_executable=$(which python3)
fi

$python_executable -m pip install --upgrade build
$python_executable -m build

pip uninstall wpdetect -y
pip install dist/wpdetect-*-py3-none-any.whl
2 changes: 2 additions & 0 deletions release-tag.sh
Original file line number Diff line number Diff line change
@@ -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
6 changes: 2 additions & 4 deletions wpdetect/__main__.py
Original file line number Diff line number Diff line change
@@ -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']

0 comments on commit ba51426

Please sign in to comment.