Compare commits

..
4 Commits
4 changed files with 47 additions and 20 deletions

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ __author__ = "Davide Testa"
__email__ = "davide@davte.it" __email__ = "davide@davte.it"
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"] __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
__license__ = "GNU General Public License v3.0" __license__ = "GNU General Public License v3.0"
__version__ = "2.10.11" __version__ = "2.10.13"
__maintainer__ = "Davide Testa" __maintainer__ = "Davide Testa"
__contact__ = "t.me/davte" __contact__ = "t.me/davte"
+1 -2
View File
@@ -892,8 +892,7 @@ async def get_new_versions(bot: Bot,
"package %s", package.__name__) "package %s", package.__name__)
notification_record = bot.db['updates_notifications'].find_one( notification_record = bot.db['updates_notifications'].find_one(
package=package.__name__, package=package.__name__,
order_by=['-id'], order_by=['-id']
_limit=1
) )
if ( if (
new_version != current_version new_version != current_version
-1
View File
@@ -65,7 +65,6 @@ setuptools.setup(
"Environment :: Console", "Environment :: Console",
"Framework :: AsyncIO", "Framework :: AsyncIO",
"Intended Audience :: Developers", "Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English", "Natural Language :: English",
"Operating System :: OS Independent", "Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3 :: Only",
+45 -16
View File
@@ -1,24 +1,53 @@
#!/bin/bash #!/bin/bash
set -e
# Get current directory # Get current directory
this_script_directory=$(cd "$(dirname "$0")" && pwd) this_script_directory=$(cd "$(dirname "$0")" && pwd)
packenv="";
# Python virtual environment directory: packenv variable in my_config.sh # Python virtual environment directory
source "$this_script_directory"/my_config.sh; packenv=""
# Ensure the success of importing procedure # shellcheck disable=SC1091
if [ -z "${packenv}" ]; source "${this_script_directory}/my_config.sh"
then
printf "Please set in ""my_config.sh"" the path to bot python virtual environment\n\nExample:\npackenv=""path/to/virtual/env""\n"; # Validate configuration
exit; if [ -z "$packenv" ]; then
printf 'Please set "packenv" in my_config.sh\n\nExample:\npackenv="path/to/virtual/env"\n'
exit 1
fi fi
# Push, build and publish package to pypi.org # Validate virtual environment
bash "$this_script_directory"/push_to_remotes.sh; if [ ! -x "${packenv}/bin/python" ]; then
rm -rf "$this_script_directory/build"; echo "Python executable not found: ${packenv}/bin/python"
rm -rf "$this_script_directory/dist"; exit 1
rm -rf "$this_script_directory/davtelepot.egg-info"; fi
"$packenv"/python setup.py sdist;
"$packenv"/pip wheel --no-index --no-deps --wheel-dir dist dist/*.tar.gz; python="${packenv}/bin/python"
"$packenv"/twine upload --skip-existing dist/*; twine="${packenv}/bin/twine"
if [ ! -x "$twine" ]; then
echo "Twine not found. Install it with: ${python} -m pip install twine"
exit 1
fi
# Push changes to remotes
bash "$this_script_directory/push_to_remotes.sh"
# Clean previous builds
rm -rf "$this_script_directory"/{build,dist,davtelepot.egg-info}
cd "$this_script_directory" || exit 1
# Build source distribution
"${python}" setup.py sdist
# Build wheel using locally installed build dependencies
"${python}" -m pip wheel \
--no-index \
--no-deps \
--no-build-isolation \
--wheel-dir dist \
dist/*.tar.gz
# Publish to PyPI
"${twine}" upload --skip-existing dist/*