Compare commits

...

9 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
943e84e3d9 Release version 0.38.0 2021-02-13 03:55:02 -05:00
Jose Diaz-Gonzalez
0c924c3158 Merge pull request #172 from samanthaq/always-use-oauth-when-provided
fix: Always clone with OAuth token when provided
2021-02-13 03:53:26 -05:00
Samantha Baldwin
f62c4eaf8b fix: Always clone with OAuth token when provided
Github Enterprise servers with 'Anonymous Git read access' disabled
cause `git ls-remote` to fail (128) for a repo's `clone_url`. Using the
OAuth token when provided allows cloning private AND public repos when
Anonymous Git read access is disabled.
2021-02-12 00:46:06 -05:00
Jose Diaz-Gonzalez
a53d7f6849 Merge pull request #170 from Mindavi/bugfix/broken-url
Fix broken and incorrect link to github repository
2021-01-18 00:12:09 -05:00
Rick van Schijndel
4e571d0735 Change broken link to a fork to a working link to upstream 2021-01-03 23:08:58 +01:00
Jose Diaz-Gonzalez
5a71bc5e5a Release version 0.37.2 2021-01-01 21:31:06 -05:00
Jose Diaz-Gonzalez
794ccf3996 fix: use distutils.core on error 2021-01-01 21:30:54 -05:00
Jose Diaz-Gonzalez
977424c153 Release version 0.37.1 2021-01-01 21:28:25 -05:00
Jose Diaz-Gonzalez
613576dd25 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
2021-01-01 21:28:03 -05:00
7 changed files with 91 additions and 9 deletions

1
.gitignore vendored
View File

@@ -34,3 +34,4 @@ doc/aws_hostname.1
.vscode .vscode
.atom .atom
README

View File

@@ -1,9 +1,69 @@
Changelog Changelog
========= =========
0.37.0 (2021-01-01) 0.38.0 (2021-02-13)
------------------- -------------------
------------ ------------
Fix
~~~
- Always clone with OAuth token when provided. [Samantha Baldwin]
Github Enterprise servers with 'Anonymous Git read access' disabled
cause `git ls-remote` to fail (128) for a repo's `clone_url`. Using the
OAuth token when provided allows cloning private AND public repos when
Anonymous Git read access is disabled.
Other
~~~~~
- Merge pull request #172 from samanthaq/always-use-oauth-when-provided.
[Jose Diaz-Gonzalez]
fix: Always clone with OAuth token when provided
- Merge pull request #170 from Mindavi/bugfix/broken-url. [Jose Diaz-
Gonzalez]
Fix broken and incorrect link to github repository
- Change broken link to a fork to a working link to upstream. [Rick van
Schijndel]
0.37.2 (2021-01-02)
-------------------
Fix
~~~
- Use distutils.core on error. [Jose Diaz-Gonzalez]
Other
~~~~~
- Release version 0.37.2. [Jose Diaz-Gonzalez]
0.37.1 (2021-01-02)
-------------------
Fix
~~~
- Use twine for releases. [Jose Diaz-Gonzalez]
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
Other
~~~~~
- Release version 0.37.1. [Jose Diaz-Gonzalez]
0.37.0 (2021-01-02)
-------------------
- Release version 0.37.0. [Jose Diaz-Gonzalez]
- Merge pull request #158 from albertyw/python3. [Jose Diaz-Gonzalez] - Merge pull request #158 from albertyw/python3. [Jose Diaz-Gonzalez]
Remove support for python 2 Remove support for python 2

View File

@@ -178,4 +178,4 @@ This project currently contains no unit tests. To run linting::
.. |PyPI| image:: https://img.shields.io/pypi/v/github-backup.svg .. |PyPI| image:: https://img.shields.io/pypi/v/github-backup.svg
:target: https://pypi.python.org/pypi/github-backup/ :target: https://pypi.python.org/pypi/github-backup/
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/github-backup.svg .. |Python Versions| image:: https://img.shields.io/pypi/pyversions/github-backup.svg
:target: https://github.com/albertyw/github-backup :target: https://github.com/josegonzalez/python-github-backup

View File

@@ -1 +1 @@
__version__ = '0.37.0' __version__ = '0.38.0'

View File

@@ -420,7 +420,7 @@ def get_github_repo_url(args, repository):
return repository['ssh_url'] return repository['ssh_url']
auth = get_auth(args, encode=False, for_git_cli=True) auth = get_auth(args, encode=False, for_git_cli=True)
if auth and repository['private'] is True: if auth:
repo_url = 'https://{0}@{1}/{2}/{3}.git'.format( repo_url = 'https://{0}@{1}/{2}/{3}.git'.format(
auth, auth,
get_github_host(args), get_github_host(args),

10
release
View File

@@ -22,7 +22,7 @@ CYAN="\033[0;36m" # cyan
pip install wheel > /dev/null pip install wheel > /dev/null
command -v gitchangelog >/dev/null 2>&1 || { 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 exit 1
} }
@@ -31,6 +31,11 @@ command -v rst-lint > /dev/null || {
exit 1 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 if [[ "$@" != "major" ]] && [[ "$@" != "minor" ]] && [[ "$@" != "patch" ]]; then
echo -e "${RED}WARNING: Invalid release type, must specify 'major', 'minor', or 'patch'${COLOR_OFF}\n" echo -e "${RED}WARNING: Invalid release type, must specify 'major', 'minor', or 'patch'${COLOR_OFF}\n"
exit 1 exit 1
@@ -125,7 +130,8 @@ git push -q origin master && git push -q --tags
if [[ "$PUBLIC" == "true" ]]; then if [[ "$PUBLIC" == "true" ]]; then
echo -e "${YELLOW}--->${COLOR_OFF} Creating python release" echo -e "${YELLOW}--->${COLOR_OFF} Creating python release"
cp README.rst README 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 rm README
fi fi

View File

@@ -1,10 +1,24 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os
from setuptools import setup
from github_backup import __version__ from github_backup import __version__
try:
from setuptools import setup
setup # workaround for pyflakes issue #13
except ImportError:
from distutils.core import setup
# Hack to prevent stupid TypeError: 'NoneType' object is not callable error on
# exit of python setup.py test # in multiprocessing/util.py _exit_function when
# running python setup.py test (see
# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
import multiprocessing
multiprocessing
except ImportError:
pass
def open_file(fname): def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname)) return open(os.path.join(os.path.dirname(__file__), fname))
@@ -18,7 +32,7 @@ setup(
packages=['github_backup'], packages=['github_backup'],
scripts=['bin/github-backup'], scripts=['bin/github-backup'],
url='http://github.com/josegonzalez/python-github-backup', url='http://github.com/josegonzalez/python-github-backup',
license=open('LICENSE.txt').read(), license='MIT',
classifiers=[ classifiers=[
'Development Status :: 5 - Production/Stable', 'Development Status :: 5 - Production/Stable',
'Topic :: System :: Archiving :: Backup', 'Topic :: System :: Archiving :: Backup',
@@ -30,6 +44,7 @@ setup(
], ],
description='backup a github user or organization', description='backup a github user or organization',
long_description=open_file('README.rst').read(), long_description=open_file('README.rst').read(),
long_description_content_type='text/x-rst',
install_requires=open_file('requirements.txt').readlines(), install_requires=open_file('requirements.txt').readlines(),
zip_safe=True, zip_safe=True,
) )