forked from evennia/evennia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.release.sh
executable file
·45 lines (36 loc) · 1.53 KB
/
.release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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 for Github (tagging) and PyPi (main package)."
echo " 2. Update CHANGELOG.md."
echo " 3. Run 'make local' in docs/ to update dynamic docs and autodocstrings (may have to run twice)."
echo " 4. Make sure VERSION.txt and pyproject.toml both show version $VERSION."
echo " 5. Make sure all changes are committed, e.g. as 'Evennia 1.x.x bug-fix release' (un-staged files will be wiped)."
echo " 6. 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 PyPi credentials) ..."
python -m twine upload dist/*
# tag the latest git commit
echo "Creating and pushing release tag tag v$VERSION (requires GitHub credentials)..."
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."