mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-24 16:41:10 +01:00
fix: use twine for releases
The old method of releasing to pypi broke for whatever reason and switching to a supported toolchain is easier than debugging the old one. Additionally: - Update gitchangelog - Fix license entry - Set long description type - Gitignore the temporary readme file
This commit is contained in:
10
release
10
release
@@ -22,7 +22,7 @@ CYAN="\033[0;36m" # cyan
|
||||
pip install wheel > /dev/null
|
||||
|
||||
command -v gitchangelog >/dev/null 2>&1 || {
|
||||
echo -e "${RED}WARNING: Missing gitchangelog binary, please run: pip install gitchangelog==2.2.0${COLOR_OFF}\n"
|
||||
echo -e "${RED}WARNING: Missing gitchangelog binary, please run: pip install gitchangelog==3.0.4${COLOR_OFF}\n"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -31,6 +31,11 @@ command -v rst-lint > /dev/null || {
|
||||
exit 1
|
||||
}
|
||||
|
||||
command -v twine > /dev/null || {
|
||||
echo -e "${RED}WARNING: Missing twine binary, please run: pip install twine==3.2.0${COLOR_OFF}\n"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [[ "$@" != "major" ]] && [[ "$@" != "minor" ]] && [[ "$@" != "patch" ]]; then
|
||||
echo -e "${RED}WARNING: Invalid release type, must specify 'major', 'minor', or 'patch'${COLOR_OFF}\n"
|
||||
exit 1
|
||||
@@ -125,7 +130,8 @@ git push -q origin master && git push -q --tags
|
||||
if [[ "$PUBLIC" == "true" ]]; then
|
||||
echo -e "${YELLOW}--->${COLOR_OFF} Creating python release"
|
||||
cp README.rst README
|
||||
python setup.py sdist bdist_wheel upload > /dev/null
|
||||
python setup.py sdist bdist_wheel > /dev/null
|
||||
twine upload dist/*
|
||||
rm README
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user