Skip to content

Commit 613576d

Browse files
author
Jose Diaz-Gonzalez
committed
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
1 parent 638bf7a commit 613576d

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ doc/aws_hostname.1
3434
.vscode
3535
.atom
3636

37+
README

release

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ CYAN="\033[0;36m" # cyan
2222
pip install wheel > /dev/null
2323

2424
command -v gitchangelog >/dev/null 2>&1 || {
25-
echo -e "${RED}WARNING: Missing gitchangelog binary, please run: pip install gitchangelog==2.2.0${COLOR_OFF}\n"
25+
echo -e "${RED}WARNING: Missing gitchangelog binary, please run: pip install gitchangelog==3.0.4${COLOR_OFF}\n"
2626
exit 1
2727
}
2828

@@ -31,6 +31,11 @@ command -v rst-lint > /dev/null || {
3131
exit 1
3232
}
3333

34+
command -v twine > /dev/null || {
35+
echo -e "${RED}WARNING: Missing twine binary, please run: pip install twine==3.2.0${COLOR_OFF}\n"
36+
exit 1
37+
}
38+
3439
if [[ "$@" != "major" ]] && [[ "$@" != "minor" ]] && [[ "$@" != "patch" ]]; then
3540
echo -e "${RED}WARNING: Invalid release type, must specify 'major', 'minor', or 'patch'${COLOR_OFF}\n"
3641
exit 1
@@ -125,7 +130,8 @@ git push -q origin master && git push -q --tags
125130
if [[ "$PUBLIC" == "true" ]]; then
126131
echo -e "${YELLOW}--->${COLOR_OFF} Creating python release"
127132
cp README.rst README
128-
python setup.py sdist bdist_wheel upload > /dev/null
133+
python setup.py sdist bdist_wheel > /dev/null
134+
twine upload dist/*
129135
rm README
130136
fi
131137

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def open_file(fname):
1818
packages=['github_backup'],
1919
scripts=['bin/github-backup'],
2020
url='http://github.com/josegonzalez/python-github-backup',
21-
license=open('LICENSE.txt').read(),
21+
license='MIT',
2222
classifiers=[
2323
'Development Status :: 5 - Production/Stable',
2424
'Topic :: System :: Archiving :: Backup',
@@ -30,6 +30,7 @@ def open_file(fname):
3030
],
3131
description='backup a github user or organization',
3232
long_description=open_file('README.rst').read(),
33+
long_description_content_type='text/x-rst',
3334
install_requires=open_file('requirements.txt').readlines(),
3435
zip_safe=True,
3536
)

0 commit comments

Comments
 (0)