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