From 8122c4f942a7ae0583b8dea512b181a9ba9328f2 Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 7 Dec 2022 19:36:27 +0100 Subject: [PATCH] Evennia 1.0.1 bug fix release --- .release.sh | 44 +++++++++++++++++++++++++++++++++++++++++ Makefile | 10 ++++------ evennia/VERSION.txt | 2 +- evennia/utils/evmenu.py | 13 +----------- pyproject.toml | 2 +- 5 files changed, 51 insertions(+), 20 deletions(-) create mode 100755 .release.sh diff --git a/.release.sh b/.release.sh new file mode 100755 index 0000000000..52a4e632c0 --- /dev/null +++ b/.release.sh @@ -0,0 +1,44 @@ +# Release helper + +VERSION=$(cat evennia/VERSION.txt) + +echo "This will release Evennia $VERSION (based on evennia/VERSION.txt)." +echo "Before continuing:" +echo " 1. Make sure you have Evennia upload credentials." +echo " 2. Determine if CHANGELOG.md should be updated and rebuilt." +echo " 3. Make sure VERSION.txt and pyproject.toml both show version $VERSION." +echo " 4. Make sure all changes are committed (all un-staged files will be wiped)." +echo " 5. Make sure all unit tests pass." + +read -p "Continue? [Y/n]> " yn + +case $yn in + [nN] ) echo "Aborting."; + exit;; + * ) echo "Starting release ...";; +esac + +# clean and build the pypi distribution +echo "Preparing and Building PyPi package ..." +rm -Rf dist/ +git clean -xdf +pip install --upgrade pip +pip install build twine +python -m build --sdist --wheel --outdir dist/ . + +echo "Uploading PyPi package (requires credentials) ..." + +python -m twine upload dist/* + +# tag the latest git commit +echo "Creating and pushing release tag tag v$VERSION ..." +git tag -a v$VERSION -m "Evennia release v$VERSION" +git push --tags + +echo "... Release complete." +echo "" +echo "Post-release actions:" +echo " 1. Make sure to push all commits." +echo " 2. Update github discussions to report on release." +echo " 2. Make post in discord #announcements channel pointing to discussion post." +echo " 3. Any other announcements as needed." diff --git a/Makefile b/Makefile index 5d707a6e04..8ccf3f355d 100644 --- a/Makefile +++ b/Makefile @@ -44,10 +44,8 @@ testp: evennia migrate;\ evennia test --keepdb --parallel 4 $(TESTS);\ +version: + echo $(VERSION) + release: - rm -Rf dist/ - git clean -xdf - pip install --upgrade pip - pip install build twine - python -m build --sdist --wheel --outdir dist/ . - python -m twine upload dist/* + ./.release.sh diff --git a/evennia/VERSION.txt b/evennia/VERSION.txt index d3827e75a5..7dea76edb3 100644 --- a/evennia/VERSION.txt +++ b/evennia/VERSION.txt @@ -1 +1 @@ -1.0 +1.0.1 diff --git a/evennia/utils/evmenu.py b/evennia/utils/evmenu.py index 4f4ecddfc4..2ee0163e06 100644 --- a/evennia/utils/evmenu.py +++ b/evennia/utils/evmenu.py @@ -273,22 +273,12 @@ from django.conf import settings # i18n from django.utils.translation import gettext as _ - from evennia import CmdSet, Command from evennia.commands import cmdhandler from evennia.utils import logger from evennia.utils.ansi import strip_ansi from evennia.utils.evtable import EvColumn, EvTable -from evennia.utils.utils import ( - crop, - dedent, - is_iter, - m_len, - make_iter, - mod_import, - pad, - to_str, -) +from evennia.utils.utils import crop, dedent, is_iter, m_len, make_iter, mod_import, pad, to_str # read from protocol NAWS later? _MAX_TEXT_WIDTH = settings.CLIENT_DEFAULT_WIDTH @@ -1179,7 +1169,6 @@ class EvMenu: for icol in range(ncols): start = icol * split end = min(start + split, max_end) - print(f"col {icol}:", table[start:end]) cols_list.append(EvColumn(*table[start:end])) return str(EvTable(table=cols_list, border="none")) diff --git a/pyproject.toml b/pyproject.toml index 1a1e53abaa..b348843cc2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "evennia" -version = "1.0" +version = "1.0.1" maintainers = [{ name = "Griatch", email = "griatch@gmail.com" }] description = "A full-featured toolkit and server for text-based multiplayer games (MUDs, MU*, etc)." requires-python = ">=3.10"