mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-05 16:18:02 +01:00
Compare commits
152 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1cf4cd315 | ||
|
|
f3340cd9eb | ||
|
|
0ebaffd102 | ||
|
|
2730fc3e5a | ||
|
|
0b2330c2c4 | ||
|
|
82e35fb1cf | ||
|
|
e8f027469e | ||
|
|
37ef0222e1 | ||
|
|
96a73b3fe8 | ||
|
|
8b1bfd433c | ||
|
|
cca8a851ad | ||
|
|
b5d749ec46 | ||
|
|
00e5c019db | ||
|
|
fbb977acf4 | ||
|
|
07e32b186c | ||
|
|
dcc90b747a | ||
|
|
f414fac108 | ||
|
|
38692bc836 | ||
|
|
81362e5596 | ||
|
|
753a26d0d6 | ||
|
|
b629a865f4 | ||
|
|
75ec773a6f | ||
|
|
f8a16ee0f8 | ||
|
|
3d5eb359e2 | ||
|
|
63441ebfbc | ||
|
|
7ad324225e | ||
|
|
885e94a102 | ||
|
|
9e1800f56e | ||
|
|
d057ee0d04 | ||
|
|
64562f2460 | ||
|
|
f7f9ffd017 | ||
|
|
048ef04e2a | ||
|
|
b1acfed83a | ||
|
|
18e78a4d66 | ||
|
|
1ed5427043 | ||
|
|
c2e3665ed8 | ||
|
|
0a30a92fe4 | ||
|
|
cc52587f52 | ||
|
|
853b7c46a1 | ||
|
|
e23d12d490 | ||
|
|
f8e1151111 | ||
|
|
664c2a765e | ||
|
|
fa7148d38f | ||
|
|
480ce3ce2a | ||
|
|
943e84e3d9 | ||
|
|
0c924c3158 | ||
|
|
f62c4eaf8b | ||
|
|
a53d7f6849 | ||
|
|
4e571d0735 | ||
|
|
5a71bc5e5a | ||
|
|
794ccf3996 | ||
|
|
977424c153 | ||
|
|
613576dd25 | ||
|
|
638bf7a77e | ||
|
|
725f2c3b8f | ||
|
|
41ece08152 | ||
|
|
3a5ef5158d | ||
|
|
cb1b0b6c6b | ||
|
|
d7f0747432 | ||
|
|
d411e20580 | ||
|
|
d7b85264cd | ||
|
|
031a984434 | ||
|
|
9e16f39e3e | ||
|
|
2de96390be | ||
|
|
78cff47a91 | ||
|
|
fa27988c1c | ||
|
|
bb2e2b8c6f | ||
|
|
8fd0f2b64f | ||
|
|
753a551961 | ||
|
|
607b6ca69b | ||
|
|
ef71655b01 | ||
|
|
d8bcbfa644 | ||
|
|
751b0d6e82 | ||
|
|
ea633ca2bb | ||
|
|
a2115ce3e5 | ||
|
|
8a00bb1903 | ||
|
|
e53f8d4724 | ||
|
|
356f5f674b | ||
|
|
13128635cb | ||
|
|
6e6842b025 | ||
|
|
272177c395 | ||
|
|
70f711ea68 | ||
|
|
3fc9957aac | ||
|
|
78098aae23 | ||
|
|
fb7cc5ed53 | ||
|
|
c0679b9cc3 | ||
|
|
03b9d1b2d8 | ||
|
|
5025f69878 | ||
|
|
a351cdc103 | ||
|
|
85e4399408 | ||
|
|
c8171b692a | ||
|
|
523c811cc6 | ||
|
|
857ad0afab | ||
|
|
3f65eadee1 | ||
|
|
a8e8841b26 | ||
|
|
8e542fd6b6 | ||
|
|
1865941b14 | ||
|
|
03c68561a5 | ||
|
|
196acd0aca | ||
|
|
679ac841f6 | ||
|
|
498d9eba32 | ||
|
|
0f82b1717c | ||
|
|
4d5126f303 | ||
|
|
b864218b44 | ||
|
|
98919c82c9 | ||
|
|
045eacbf18 | ||
|
|
7a234ba7ed | ||
|
|
e8a255b450 | ||
|
|
81a2f762da | ||
|
|
cb0293cbe5 | ||
|
|
252c25461f | ||
|
|
e8ed03fd06 | ||
|
|
38010d7c39 | ||
|
|
71b4288e6b | ||
|
|
ba4fa9fa2d | ||
|
|
869f761c90 | ||
|
|
195e700128 | ||
|
|
27441b71b6 | ||
|
|
cfeaee7309 | ||
|
|
fac8e4274f | ||
|
|
17fee66f31 | ||
|
|
a56d27dd8b | ||
|
|
e57873b6dd | ||
|
|
2658b039a1 | ||
|
|
fd684a71fb | ||
|
|
bacd77030b | ||
|
|
b73079daf2 | ||
|
|
eca8a70666 | ||
|
|
e74765ba7f | ||
|
|
6db5bd731b | ||
|
|
7305871c20 | ||
|
|
baf7b1a9b4 | ||
|
|
121fa68294 | ||
|
|
44dfc79edc | ||
|
|
89f59cc7a2 | ||
|
|
ad8c5b8768 | ||
|
|
921aab3729 | ||
|
|
ea4c3d0f6f | ||
|
|
9b6400932d | ||
|
|
de0c3f46c6 | ||
|
|
73b069f872 | ||
|
|
3d3f512074 | ||
|
|
1c3078992d | ||
|
|
4b40ae94d7 | ||
|
|
a18fda9faf | ||
|
|
41130fc8b0 | ||
|
|
2340a02fc6 | ||
|
|
cafff4ae80 | ||
|
|
3193d120e5 | ||
|
|
da4b29a2d6 | ||
|
|
d05c96ecef | ||
|
|
c86163bfe6 |
23
.circleci/config.yml
Normal file
23
.circleci/config.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
version: 2.1
|
||||||
|
|
||||||
|
orbs:
|
||||||
|
python: circleci/python@0.3.2
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-test:
|
||||||
|
executor: python/default
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- python/load-cache
|
||||||
|
- run:
|
||||||
|
command: pip install flake8
|
||||||
|
name: Install dependencies
|
||||||
|
- python/save-cache
|
||||||
|
- run:
|
||||||
|
command: flake8 --ignore=E501
|
||||||
|
name: Lint
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
main:
|
||||||
|
jobs:
|
||||||
|
- build-and-test
|
||||||
117
.gitchangelog.rc
Normal file
117
.gitchangelog.rc
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
#
|
||||||
|
# Format
|
||||||
|
#
|
||||||
|
# ACTION: [AUDIENCE:] COMMIT_MSG [@TAG ...]
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
#
|
||||||
|
# ACTION is one of 'chg', 'fix', 'new'
|
||||||
|
#
|
||||||
|
# Is WHAT the change is about.
|
||||||
|
#
|
||||||
|
# 'chg' is for refactor, small improvement, cosmetic changes...
|
||||||
|
# 'fix' is for bug fixes
|
||||||
|
# 'new' is for new features, big improvement
|
||||||
|
#
|
||||||
|
# SUBJECT is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc'
|
||||||
|
#
|
||||||
|
# Is WHO is concerned by the change.
|
||||||
|
#
|
||||||
|
# 'dev' is for developpers (API changes, refactors...)
|
||||||
|
# 'usr' is for final users (UI changes)
|
||||||
|
# 'pkg' is for packagers (packaging changes)
|
||||||
|
# 'test' is for testers (test only related changes)
|
||||||
|
# 'doc' is for doc guys (doc only changes)
|
||||||
|
#
|
||||||
|
# COMMIT_MSG is ... well ... the commit message itself.
|
||||||
|
#
|
||||||
|
# TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic'
|
||||||
|
#
|
||||||
|
# 'refactor' is obviously for refactoring code only
|
||||||
|
# 'minor' is for a very meaningless change (a typo, adding a comment)
|
||||||
|
# 'cosmetic' is for cosmetic driven change (re-indentation, 80-col...)
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
#
|
||||||
|
# new: usr: support of bazaar implemented
|
||||||
|
# chg: re-indentend some lines @cosmetic
|
||||||
|
# new: dev: updated code to be compatible with last version of killer lib.
|
||||||
|
# fix: pkg: updated year of licence coverage.
|
||||||
|
# new: test: added a bunch of test around user usability of feature X.
|
||||||
|
# fix: typo in spelling my name in comment. @minor
|
||||||
|
#
|
||||||
|
# Please note that multi-line commit message are supported, and only the
|
||||||
|
# first line will be considered as the "summary" of the commit message. So
|
||||||
|
# tags, and other rules only applies to the summary. The body of the commit
|
||||||
|
# message will be displayed in the changelog with minor reformating.
|
||||||
|
|
||||||
|
#
|
||||||
|
# ``ignore_regexps`` is a line of regexps
|
||||||
|
#
|
||||||
|
# Any commit having its full commit message matching any regexp listed here
|
||||||
|
# will be ignored and won't be reported in the changelog.
|
||||||
|
#
|
||||||
|
ignore_regexps = [
|
||||||
|
r'(?i)^(Merge pull request|Merge branch|Release|Update)',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# ``replace_regexps`` is a dict associating a regexp pattern and its replacement
|
||||||
|
#
|
||||||
|
# It will be applied to get the summary line from the full commit message.
|
||||||
|
#
|
||||||
|
# Note that you can provide multiple replacement patterns, they will be all
|
||||||
|
# tried. If None matches, the summary line will be the full commit message.
|
||||||
|
#
|
||||||
|
replace_regexps = {
|
||||||
|
# current format (ie: 'chg: dev: my commit msg @tag1 @tag2')
|
||||||
|
|
||||||
|
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$':
|
||||||
|
r'\4',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# ``section_regexps`` is a list of 2-tuples associating a string label and a
|
||||||
|
# list of regexp
|
||||||
|
#
|
||||||
|
# Commit messages will be classified in sections thanks to this. Section
|
||||||
|
# titles are the label, and a commit is classified under this section if any
|
||||||
|
# of the regexps associated is matching.
|
||||||
|
#
|
||||||
|
section_regexps = [
|
||||||
|
('New', [
|
||||||
|
r'^[nN]ew\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||||
|
]),
|
||||||
|
('Changes', [
|
||||||
|
r'^[cC]hg\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||||
|
]),
|
||||||
|
('Fix', [
|
||||||
|
r'^[fF]ix\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||||
|
]),
|
||||||
|
('Other', None # Match all lines
|
||||||
|
),
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
# ``body_split_regexp`` is a regexp
|
||||||
|
#
|
||||||
|
# Commit message body (not the summary) if existing will be split
|
||||||
|
# (new line) on this regexp
|
||||||
|
#
|
||||||
|
body_split_regexp = r'[\n-]'
|
||||||
|
|
||||||
|
|
||||||
|
# ``tag_filter_regexp`` is a regexp
|
||||||
|
#
|
||||||
|
# Tags that will be used for the changelog must match this regexp.
|
||||||
|
#
|
||||||
|
# tag_filter_regexp = r'^[0-9]+$'
|
||||||
|
tag_filter_regexp = r'^(?:[vV])?[0-9\.]+$'
|
||||||
|
|
||||||
|
|
||||||
|
# ``unreleased_version_label`` is a string
|
||||||
|
#
|
||||||
|
# This label will be used as the changelog Title of the last set of changes
|
||||||
|
# between last valid tag and HEAD if any.
|
||||||
|
unreleased_version_label = "%%version%% (unreleased)"
|
||||||
19
.github/workflows/tagged-release.yml
vendored
Normal file
19
.github/workflows/tagged-release.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
name: "tagged-release"
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tagged-release:
|
||||||
|
name: tagged-release
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: "marvinpinto/action-automatic-releases@v1.2.1"
|
||||||
|
with:
|
||||||
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
prerelease: false
|
||||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -25,3 +25,13 @@ doc/_build
|
|||||||
|
|
||||||
# Generated man page
|
# Generated man page
|
||||||
doc/aws_hostname.1
|
doc/aws_hostname.1
|
||||||
|
|
||||||
|
# Annoying macOS files
|
||||||
|
.DS_Store
|
||||||
|
._*
|
||||||
|
|
||||||
|
# IDE configuration files
|
||||||
|
.vscode
|
||||||
|
.atom
|
||||||
|
|
||||||
|
README
|
||||||
419
CHANGES.rst
419
CHANGES.rst
@@ -1,72 +1,356 @@
|
|||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
0.22.1 (2019-02-21)
|
0.43.1 (2023-05-29)
|
||||||
|
-------------------
|
||||||
|
------------------------
|
||||||
|
- Chore: add release requirements. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
|
|
||||||
|
0.43.0 (2023-05-29)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
Fix
|
||||||
|
~~~
|
||||||
|
- Do not update readme. [Jose Diaz-Gonzalez]
|
||||||
|
- Adjust for black. [Jose Diaz-Gonzalez]
|
||||||
|
- Adjust for black. [Jose Diaz-Gonzalez]
|
||||||
|
- Adjust for black. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
|
Other
|
||||||
|
~~~~~
|
||||||
|
- Feat: commit gitchangelog.rc to repo so anyone can generate a
|
||||||
|
changelog. [Jose Diaz-Gonzalez]
|
||||||
|
- Feat: add release tagging. [Jose Diaz-Gonzalez]
|
||||||
|
- Chore: formatting. [Jose Diaz-Gonzalez]
|
||||||
|
- Chore: run black. [Jose Diaz-Gonzalez]
|
||||||
|
- Add --log-level command line argument. [Enrico Tröger]
|
||||||
|
|
||||||
|
Support changing the log level to the desired value easily.
|
||||||
|
For example, this is useful to suppress progress messages but
|
||||||
|
keep logging warnings and errors.
|
||||||
|
- Check both updated_at and pushed_at properties. [Ken Bailey]
|
||||||
|
|
||||||
|
Check both updated_at and pushed_at dates to get the last_update to reduce data retrieved on incremental api calls using since.
|
||||||
|
|
||||||
|
|
||||||
|
0.42.0 (2022-11-28)
|
||||||
|
-------------------
|
||||||
|
- Add option to exclude repositories. [npounder]
|
||||||
|
- Backup regular pull request comments as well. [Oneric]
|
||||||
|
|
||||||
|
Before, only review comments were backed up;
|
||||||
|
regular comments need to be fetched via issue API.
|
||||||
|
- Fix bug forever retry when request url error. [kornpisey]
|
||||||
|
- Added --no-prune option to disable prune option when doing git fetch.
|
||||||
|
[kornpisey]
|
||||||
|
|
||||||
|
|
||||||
|
0.41.0 (2022-03-02)
|
||||||
|
-------------------
|
||||||
|
- Git lfs clone doe snot respect --mirror. [Louis Parisot]
|
||||||
|
|
||||||
|
|
||||||
|
0.40.2 (2021-12-29)
|
||||||
|
-------------------
|
||||||
|
- Fix lint issues raised by Flake8. [atinary-afoulon]
|
||||||
|
|
||||||
|
According to job:
|
||||||
|
[ https://app.circleci.com/pipelines/github/josegonzalez/python-github-backup/30/workflows/74eb93f2-2505-435d-b728-03b3cc04c14a/jobs/23 ]
|
||||||
|
|
||||||
|
Failed on the following checks:
|
||||||
|
./github_backup/github_backup.py:20:1: F811 redefinition of unused 'logging' from line 14
|
||||||
|
./github_backup/github_backup.py:45:1: E302 expected 2 blank lines, found 1
|
||||||
|
./github_backup/github_backup.py:136:20: E251 unexpected spaces around keyword / parameter equals
|
||||||
|
|
||||||
|
|
||||||
|
0.40.1 (2021-09-22)
|
||||||
|
-------------------
|
||||||
|
- Revert to fetch. [Harrison Wright]
|
||||||
|
|
||||||
|
|
||||||
|
0.40.0 (2021-07-12)
|
||||||
|
-------------------
|
||||||
|
- Add retry on certain network errors. [Jacek Nykis]
|
||||||
|
|
||||||
|
This change includes certain network level errors in the retry logic.
|
||||||
|
It partially address #110 but I think more comprehensive fix would be useful.
|
||||||
|
- Pull changes from remote. [Jonas]
|
||||||
|
|
||||||
|
use `git pull` to pull actual files from the remote instead of using `fetch` for only the metadata
|
||||||
|
|
||||||
|
|
||||||
|
0.39.0 (2021-03-19)
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Fix
|
||||||
|
~~~
|
||||||
|
- Fix missing INFO logs. [Gallo Feliz]
|
||||||
|
|
||||||
|
Other
|
||||||
|
~~~~~
|
||||||
|
- Try to make compatible code with direct Python call ; reduce the hard
|
||||||
|
link of the code with the cli. [Gallo Feliz]
|
||||||
|
- Fixed release_name with slash bug. [Álvaro Torres Cogollo]
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
~~~~~
|
||||||
|
- 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]
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
0.37.0 (2021-01-02)
|
||||||
|
-------------------
|
||||||
|
- Add support for python 3.7 and 3.8 in package classifiers. [Albert
|
||||||
|
Wang]
|
||||||
|
- Remove support for python 2.7 in package classifiers. [Albert Wang]
|
||||||
|
- Remove python 2 specific import logic. [Albert Wang]
|
||||||
|
- Remove python 2 specific logic. [Albert Wang]
|
||||||
|
- Add ability to skip archived repositories. [Gary Moon]
|
||||||
|
|
||||||
|
|
||||||
|
0.36.0 (2020-08-29)
|
||||||
|
-------------------
|
||||||
|
- Add flake8 instructions to readme. [Albert Wang]
|
||||||
|
- Fix regex string. [Albert Wang]
|
||||||
|
- Fix whitespace issues. [Albert Wang]
|
||||||
|
- Do not use bare excepts. [Albert Wang]
|
||||||
|
- Add .circleci/config.yml. [Albert Wang]
|
||||||
|
- Include --private flag in example. [wouter bolsterlee]
|
||||||
|
|
||||||
|
By default, private repositories are not included. This is surprising.
|
||||||
|
It took me a while to figure this out, and making that clear in the
|
||||||
|
example can help others to be aware of that.
|
||||||
|
|
||||||
|
|
||||||
|
0.35.0 (2020-08-05)
|
||||||
|
-------------------
|
||||||
|
- Make API request throttling optional. [Samantha Baldwin]
|
||||||
|
|
||||||
|
|
||||||
|
0.34.0 (2020-07-24)
|
||||||
|
-------------------
|
||||||
|
- Add logic for transforming gist repository urls to ssh. [Matt Fields]
|
||||||
|
|
||||||
|
|
||||||
|
0.33.0 (2020-04-13)
|
||||||
|
-------------------
|
||||||
|
- Add basic API request throttling. [Enrico Tröger]
|
||||||
|
|
||||||
|
A simple approach to throttle API requests and so keep within the rate
|
||||||
|
limits of the API. Can be enabled with "--throttle-limit" to specify
|
||||||
|
when throttling should start.
|
||||||
|
"--throttle-pause" defines the time to sleep between further API
|
||||||
|
requests.
|
||||||
|
|
||||||
|
|
||||||
|
0.32.0 (2020-04-13)
|
||||||
|
-------------------
|
||||||
|
- Add timestamp to log messages. [Enrico Tröger]
|
||||||
|
|
||||||
|
|
||||||
|
0.31.0 (2020-02-25)
|
||||||
|
-------------------
|
||||||
|
- #123 update: changed --as-app 'help' description. [ethan]
|
||||||
|
- #123: Support Authenticating As Github Application. [ethan]
|
||||||
|
|
||||||
|
|
||||||
|
0.29.0 (2020-02-14)
|
||||||
|
-------------------
|
||||||
|
- #50 update: keep main() in bin. [ethan]
|
||||||
|
- #50 - refactor for friendlier import. [ethan]
|
||||||
|
|
||||||
|
|
||||||
|
0.28.0 (2020-02-03)
|
||||||
|
-------------------
|
||||||
|
- Remove deprecated (and removed) git lfs flags. [smiley]
|
||||||
|
|
||||||
|
"--tags" and "--force" were removed at some point from "git lfs fetch". This broke our backup script.
|
||||||
|
|
||||||
|
|
||||||
|
0.27.0 (2020-01-22)
|
||||||
|
-------------------
|
||||||
|
- Fixed script fails if not installed from pip. [Ben Baron]
|
||||||
|
|
||||||
|
At the top of the script, the line from github_backup import __version__ gets the script's version number to use if the script is called with the -v or --version flags. The problem is that if the script hasn't been installed via pip (for example I cloned the repo directly to my backup server), the script will fail due to an import exception.
|
||||||
|
|
||||||
|
Also presumably it will always use the version number from pip even if running a modified version from git or a fork or something, though this does not fix that as I have no idea how to check if it's running the pip installed version or not. But at least the script will now work fine if cloned from git or just copied to another machine.
|
||||||
|
|
||||||
|
closes https://github.com/josegonzalez/python-github-backup/issues/141
|
||||||
|
- Fixed macOS keychain access when using Python 3. [Ben Baron]
|
||||||
|
|
||||||
|
Python 3 is returning bytes rather than a string, so the string concatenation to create the auth variable was throwing an exception which the script was interpreting to mean it couldn't find the password. Adding a conversion to string first fixed the issue.
|
||||||
|
- Public repos no longer include the auth token. [Ben Baron]
|
||||||
|
|
||||||
|
When backing up repositories using an auth token and https, the GitHub personal auth token is leaked in each backed up repository. It is included in the URL of each repository's git remote url.
|
||||||
|
|
||||||
|
This is not needed as they are public and can be accessed without the token and can cause issues in the future if the token is ever changed, so I think it makes more sense not to have the token stored in each repo backup. I think the token should only be "leaked" like this out of necessity, e.g. it's a private repository and the --prefer-ssh option was not chosen so https with auth token was required to perform the clone.
|
||||||
|
- Fixed comment typo. [Ben Baron]
|
||||||
|
- Switched log_info to log_warning in download_file. [Ben Baron]
|
||||||
|
- Crash when an release asset doesn't exist. [Ben Baron]
|
||||||
|
|
||||||
|
Currently, the script crashes whenever a release asset is unable to download (for example a 404 response). This change instead logs the failure and allows the script to continue. No retry logic is enabled, but at least it prevents the crash and allows the backup to complete. Retry logic can be implemented later if wanted.
|
||||||
|
|
||||||
|
closes https://github.com/josegonzalez/python-github-backup/issues/129
|
||||||
|
- Moved asset downloading loop inside the if block. [Ben Baron]
|
||||||
|
- Separate release assets and skip re-downloading. [Ben Baron]
|
||||||
|
|
||||||
|
Currently the script puts all release assets into the same folder called `releases`. So any time 2 release files have the same name, only the last one downloaded is actually saved. A particularly bad example of this is MacDownApp/macdown where all of their releases are named `MacDown.app.zip`. So even though they have 36 releases and all 36 are downloaded, only the last one is actually saved.
|
||||||
|
|
||||||
|
With this change, each releases' assets are now stored in a fubfolder inside `releases` named after the release name. There could still be edge cases if two releases have the same name, but this is still much safer tha the previous behavior.
|
||||||
|
|
||||||
|
This change also now checks if the asset file already exists on disk and skips downloading it. This drastically speeds up addiotnal syncs as it no longer downloads every single release every single time. It will now only download new releases which I believe is the expected behavior.
|
||||||
|
|
||||||
|
closes https://github.com/josegonzalez/python-github-backup/issues/126
|
||||||
|
- Added newline to end of file. [Ben Baron]
|
||||||
|
- Improved gitignore, macOS files and IDE configs. [Ben Baron]
|
||||||
|
|
||||||
|
Ignores the annoying hidden macOS files .DS_Store and ._* as well as the IDE configuration folders for contributors using the popular Visual Studio Code and Atom IDEs (more can be added later as needed).
|
||||||
|
|
||||||
|
|
||||||
|
0.26.0 (2019-09-23)
|
||||||
|
-------------------
|
||||||
|
- Workaround gist clone in `--prefer-ssh` mode. [Vladislav Yarmak]
|
||||||
|
- Create PULL_REQUEST.md. [Jose Diaz-Gonzalez]
|
||||||
|
- Create ISSUE_TEMPLATE.md. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
|
|
||||||
|
0.25.0 (2019-07-03)
|
||||||
|
-------------------
|
||||||
|
- Issue 119: Change retrieve_data to be a generator. [2a]
|
||||||
|
|
||||||
|
See issue #119.
|
||||||
|
|
||||||
|
|
||||||
|
0.24.0 (2019-06-27)
|
||||||
|
-------------------
|
||||||
|
- QKT-45: include assets - update readme. [Ethan Timm]
|
||||||
|
|
||||||
|
update readme with flag information for including assets alongside their respective releases
|
||||||
|
- Make assets it's own flag. [Harrison Wright]
|
||||||
|
- Fix super call for python2. [Harrison Wright]
|
||||||
|
- Fix redirect to s3. [Harrison Wright]
|
||||||
|
- WIP: download assets. [Harrison Wright]
|
||||||
|
- QKT-42: releases - add readme info. [ethan]
|
||||||
|
- QKT-42 update: shorter command flag. [ethan]
|
||||||
|
- QKT-42: support saving release information. [ethan]
|
||||||
|
- Fix pull details. [Harrison Wright]
|
||||||
|
|
||||||
|
|
||||||
|
0.23.0 (2019-06-04)
|
||||||
|
-------------------
|
||||||
|
- Avoid to crash in case of HTTP 502 error. [Gael de Chalendar]
|
||||||
|
|
||||||
|
Survive also on socket.error connections like on HTTPError or URLError.
|
||||||
|
|
||||||
|
This should solve issue #110.
|
||||||
|
|
||||||
|
|
||||||
|
0.22.2 (2019-02-21)
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Fix
|
||||||
|
~~~
|
||||||
|
- Warn instead of error. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
|
Refs #106
|
||||||
|
|
||||||
|
|
||||||
|
0.22.1 (2019-02-21)
|
||||||
|
-------------------
|
||||||
- Log URL error https://github.com/josegonzalez/python-github-
|
- Log URL error https://github.com/josegonzalez/python-github-
|
||||||
backup/issues/105. [JOHN STETIC]
|
backup/issues/105. [JOHN STETIC]
|
||||||
|
|
||||||
|
|
||||||
0.22.0 (2019-02-01)
|
0.22.0 (2019-02-01)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Remove unnecessary sys.exit call. [W. Harrison Wright]
|
- Remove unnecessary sys.exit call. [W. Harrison Wright]
|
||||||
|
|
||||||
- Add org check to avoid incorrect log output. [W. Harrison Wright]
|
- Add org check to avoid incorrect log output. [W. Harrison Wright]
|
||||||
|
|
||||||
- Fix accidental system exit with better logging strategy. [W. Harrison
|
- Fix accidental system exit with better logging strategy. [W. Harrison
|
||||||
Wright]
|
Wright]
|
||||||
|
|
||||||
|
|
||||||
0.21.1 (2018-12-25)
|
0.21.1 (2018-12-25)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Mark options which are not included in --all. [Bernd]
|
- Mark options which are not included in --all. [Bernd]
|
||||||
|
|
||||||
As discussed in Issue #100
|
As discussed in Issue #100
|
||||||
|
|
||||||
|
|
||||||
0.21.0 (2018-11-28)
|
0.21.0 (2018-11-28)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Correctly download repos when user arg != authenticated user. [W.
|
- Correctly download repos when user arg != authenticated user. [W.
|
||||||
Harrison Wright]
|
Harrison Wright]
|
||||||
|
|
||||||
|
|
||||||
0.20.1 (2018-09-29)
|
0.20.1 (2018-09-29)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Clone the specified user's gists, not the authenticated user. [W.
|
- Clone the specified user's gists, not the authenticated user. [W.
|
||||||
Harrison Wright]
|
Harrison Wright]
|
||||||
|
|
||||||
- Clone the specified user's starred repos, not the authenticated user.
|
- Clone the specified user's starred repos, not the authenticated user.
|
||||||
[W. Harrison Wright]
|
[W. Harrison Wright]
|
||||||
|
|
||||||
|
|
||||||
0.20.0 (2018-03-24)
|
0.20.0 (2018-03-24)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Chore: drop Python 2.6. [Jose Diaz-Gonzalez]
|
- Chore: drop Python 2.6. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Feat: simplify release script. [Jose Diaz-Gonzalez]
|
- Feat: simplify release script. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
|
|
||||||
0.19.2 (2018-03-24)
|
0.19.2 (2018-03-24)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
Fix
|
Fix
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
- Cleanup pep8 violations. [Jose Diaz-Gonzalez]
|
- Cleanup pep8 violations. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
|
|
||||||
0.19.0 (2018-03-24)
|
0.19.0 (2018-03-24)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Add additional output for the current request. [Robin Gloster]
|
- Add additional output for the current request. [Robin Gloster]
|
||||||
|
|
||||||
This is useful to have some progress indication for huge repositories.
|
This is useful to have some progress indication for huge repositories.
|
||||||
|
|
||||||
|
|
||||||
- Add option to backup additional PR details. [Robin Gloster]
|
- Add option to backup additional PR details. [Robin Gloster]
|
||||||
|
|
||||||
Some payload is only included when requesting a single pull request
|
Some payload is only included when requesting a single pull request
|
||||||
|
|
||||||
|
|
||||||
- Mark string as binary in comparison for skip_existing. [Johannes
|
- Mark string as binary in comparison for skip_existing. [Johannes
|
||||||
Bornhold]
|
Bornhold]
|
||||||
|
|
||||||
@@ -77,66 +361,53 @@ Fix
|
|||||||
|
|
||||||
0.18.0 (2018-02-22)
|
0.18.0 (2018-02-22)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Add option to fetch followers/following JSON data. [Stephen Greene]
|
- Add option to fetch followers/following JSON data. [Stephen Greene]
|
||||||
|
|
||||||
|
|
||||||
0.17.0 (2018-02-20)
|
0.17.0 (2018-02-20)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Short circuit gists backup process. [W. Harrison Wright]
|
- Short circuit gists backup process. [W. Harrison Wright]
|
||||||
|
|
||||||
- Formatting. [W. Harrison Wright]
|
- Formatting. [W. Harrison Wright]
|
||||||
|
|
||||||
- Add ability to backup gists. [W. Harrison Wright]
|
- Add ability to backup gists. [W. Harrison Wright]
|
||||||
|
|
||||||
|
|
||||||
0.16.0 (2018-01-22)
|
0.16.0 (2018-01-22)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Change option to --all-starred. [W. Harrison Wright]
|
- Change option to --all-starred. [W. Harrison Wright]
|
||||||
|
|
||||||
- JK don't update documentation. [W. Harrison Wright]
|
- JK don't update documentation. [W. Harrison Wright]
|
||||||
|
|
||||||
- Put starred clone repoistories under a new option. [W. Harrison
|
- Put starred clone repoistories under a new option. [W. Harrison
|
||||||
Wright]
|
Wright]
|
||||||
|
|
||||||
- Add comment. [W. Harrison Wright]
|
- Add comment. [W. Harrison Wright]
|
||||||
|
|
||||||
- Add ability to clone starred repos. [W. Harrison Wright]
|
- Add ability to clone starred repos. [W. Harrison Wright]
|
||||||
|
|
||||||
|
|
||||||
0.14.1 (2017-10-11)
|
0.14.1 (2017-10-11)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Fix arg not defined error. [Edward Pfremmer]
|
- Fix arg not defined error. [Edward Pfremmer]
|
||||||
|
|
||||||
Ref: https://github.com/josegonzalez/python-github-backup/issues/69
|
|
||||||
|
|
||||||
0.14.0 (2017-10-11)
|
0.14.0 (2017-10-11)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Added a check to see if git-lfs is installed when doing an LFS clone.
|
- Added a check to see if git-lfs is installed when doing an LFS clone.
|
||||||
[pieterclaerhout]
|
[pieterclaerhout]
|
||||||
|
|
||||||
- Added support for LFS clones. [pieterclaerhout]
|
- Added support for LFS clones. [pieterclaerhout]
|
||||||
|
|
||||||
- Add pypi info to readme. [Albert Wang]
|
- Add pypi info to readme. [Albert Wang]
|
||||||
|
|
||||||
- Explicitly support python 3 in package description. [Albert Wang]
|
- Explicitly support python 3 in package description. [Albert Wang]
|
||||||
|
|
||||||
- Add couple examples to help new users. [Yusuf Tran]
|
- Add couple examples to help new users. [Yusuf Tran]
|
||||||
|
|
||||||
|
|
||||||
0.13.2 (2017-05-06)
|
0.13.2 (2017-05-06)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Fix remotes while updating repository. [Dima Gerasimov]
|
- Fix remotes while updating repository. [Dima Gerasimov]
|
||||||
|
|
||||||
|
|
||||||
0.13.1 (2017-04-11)
|
0.13.1 (2017-04-11)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Fix error when repository has no updated_at value. [Nicolai Ehemann]
|
- Fix error when repository has no updated_at value. [Nicolai Ehemann]
|
||||||
|
|
||||||
|
|
||||||
0.13.0 (2017-04-05)
|
0.13.0 (2017-04-05)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Add OS check for OSX specific keychain args. [Martin O'Reilly]
|
- Add OS check for OSX specific keychain args. [Martin O'Reilly]
|
||||||
|
|
||||||
Keychain arguments are only supported on Mac OSX.
|
Keychain arguments are only supported on Mac OSX.
|
||||||
@@ -145,8 +416,6 @@ Fix
|
|||||||
error message rather than a "No password item matching the
|
error message rather than a "No password item matching the
|
||||||
provided name and account could be found in the osx keychain"
|
provided name and account could be found in the osx keychain"
|
||||||
error message
|
error message
|
||||||
|
|
||||||
|
|
||||||
- Add support for storing PAT in OSX keychain. [Martin O'Reilly]
|
- Add support for storing PAT in OSX keychain. [Martin O'Reilly]
|
||||||
|
|
||||||
Added additional optional arguments and README guidance for storing
|
Added additional optional arguments and README guidance for storing
|
||||||
@@ -156,62 +425,48 @@ Fix
|
|||||||
|
|
||||||
0.12.1 (2017-03-27)
|
0.12.1 (2017-03-27)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Avoid remote branch name churn. [Chris Adams]
|
- Avoid remote branch name churn. [Chris Adams]
|
||||||
|
|
||||||
This avoids the backup output having lots of "[new branch]" messages
|
This avoids the backup output having lots of "[new branch]" messages
|
||||||
because removing the old remote name removed all of the existing branch
|
because removing the old remote name removed all of the existing branch
|
||||||
references.
|
references.
|
||||||
|
|
||||||
|
|
||||||
- Fix detection of bare git directories. [Andrzej Maczuga]
|
- Fix detection of bare git directories. [Andrzej Maczuga]
|
||||||
|
|
||||||
|
|
||||||
0.12.0 (2016-11-22)
|
0.12.0 (2016-11-22)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
Fix
|
Fix
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
- Properly import version from github_backup package. [Jose Diaz-
|
- Properly import version from github_backup package. [Jose Diaz-
|
||||||
Gonzalez]
|
Gonzalez]
|
||||||
|
|
||||||
- Support alternate git status output. [Jose Diaz-Gonzalez]
|
- Support alternate git status output. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
Other
|
Other
|
||||||
~~~~~
|
~~~~~
|
||||||
|
|
||||||
- Pep8: E501 line too long (83 > 79 characters) [Jose Diaz-Gonzalez]
|
- Pep8: E501 line too long (83 > 79 characters) [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Pep8: E128 continuation line under-indented for visual indent. [Jose
|
- Pep8: E128 continuation line under-indented for visual indent. [Jose
|
||||||
Diaz-Gonzalez]
|
Diaz-Gonzalez]
|
||||||
|
|
||||||
- Support archivization using bare git clones. [Andrzej Maczuga]
|
- Support archivization using bare git clones. [Andrzej Maczuga]
|
||||||
|
|
||||||
- Fix typo, 3x. [Terrell Russell]
|
- Fix typo, 3x. [Terrell Russell]
|
||||||
|
|
||||||
|
|
||||||
0.11.0 (2016-10-26)
|
0.11.0 (2016-10-26)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Support --token file:///home/user/token.txt (fixes gh-51) [Björn
|
- Support --token file:///home/user/token.txt (fixes gh-51) [Björn
|
||||||
Dahlgren]
|
Dahlgren]
|
||||||
|
|
||||||
- Fix some linting. [Albert Wang]
|
- Fix some linting. [Albert Wang]
|
||||||
|
|
||||||
- Fix byte/string conversion for python 3. [Albert Wang]
|
- Fix byte/string conversion for python 3. [Albert Wang]
|
||||||
|
|
||||||
- Support python 3. [Albert Wang]
|
- Support python 3. [Albert Wang]
|
||||||
|
|
||||||
- Encode special characters in password. [Remi Rampin]
|
- Encode special characters in password. [Remi Rampin]
|
||||||
|
|
||||||
- Don't pretend program name is "Github Backup" [Remi Rampin]
|
- Don't pretend program name is "Github Backup" [Remi Rampin]
|
||||||
|
|
||||||
- Don't install over insecure connection. [Remi Rampin]
|
- Don't install over insecure connection. [Remi Rampin]
|
||||||
|
|
||||||
The git:// protocol is unauthenticated and unencrypted, and no longer advertised by GitHub. Using HTTPS shouldn't impact performance.
|
The git:// protocol is unauthenticated and unencrypted, and no longer advertised by GitHub. Using HTTPS shouldn't impact performance.
|
||||||
|
|
||||||
|
|
||||||
0.10.3 (2016-08-21)
|
0.10.3 (2016-08-21)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Fixes #29. [Jonas Michel]
|
- Fixes #29. [Jonas Michel]
|
||||||
|
|
||||||
Reporting an error when the user's rate limit is exceeded causes
|
Reporting an error when the user's rate limit is exceeded causes
|
||||||
@@ -219,8 +474,6 @@ Other
|
|||||||
sleep. Instead of generating an explicit error we just want to
|
sleep. Instead of generating an explicit error we just want to
|
||||||
inform the user that the script is going to sleep until their rate
|
inform the user that the script is going to sleep until their rate
|
||||||
limit count resets.
|
limit count resets.
|
||||||
|
|
||||||
|
|
||||||
- Fixes #29. [Jonas Michel]
|
- Fixes #29. [Jonas Michel]
|
||||||
|
|
||||||
The errors list was not being cleared out after resuming a backup
|
The errors list was not being cleared out after resuming a backup
|
||||||
@@ -231,14 +484,13 @@ Other
|
|||||||
|
|
||||||
0.10.2 (2016-08-21)
|
0.10.2 (2016-08-21)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Add a note regarding git version requirement. [Jose Diaz-Gonzalez]
|
- Add a note regarding git version requirement. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
Closes #37
|
Closes #37
|
||||||
|
|
||||||
|
|
||||||
0.10.0 (2016-08-18)
|
0.10.0 (2016-08-18)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Implement incremental updates. [Robert Bradshaw]
|
- Implement incremental updates. [Robert Bradshaw]
|
||||||
|
|
||||||
Guarded with an --incremental flag.
|
Guarded with an --incremental flag.
|
||||||
@@ -251,12 +503,11 @@ Other
|
|||||||
|
|
||||||
0.9.0 (2016-03-29)
|
0.9.0 (2016-03-29)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
- Fix cloning private repos with basic auth or token. [Kazuki Suda]
|
- Fix cloning private repos with basic auth or token. [Kazuki Suda]
|
||||||
|
|
||||||
|
|
||||||
0.8.0 (2016-02-14)
|
0.8.0 (2016-02-14)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
- Don't store issues which are actually pull requests. [Enrico Tröger]
|
- Don't store issues which are actually pull requests. [Enrico Tröger]
|
||||||
|
|
||||||
This prevents storing pull requests twice since the Github API returns
|
This prevents storing pull requests twice since the Github API returns
|
||||||
@@ -267,43 +518,31 @@ Other
|
|||||||
|
|
||||||
0.7.0 (2016-02-02)
|
0.7.0 (2016-02-02)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
- Softly fail if not able to read hooks. [Albert Wang]
|
- Softly fail if not able to read hooks. [Albert Wang]
|
||||||
|
|
||||||
- Add note about 2-factor auth. [Albert Wang]
|
- Add note about 2-factor auth. [Albert Wang]
|
||||||
|
|
||||||
- Make user repository search go through endpoint capable of reading
|
- Make user repository search go through endpoint capable of reading
|
||||||
private repositories. [Albert Wang]
|
private repositories. [Albert Wang]
|
||||||
|
|
||||||
- Prompt for password if only username given. [Alex Hall]
|
- Prompt for password if only username given. [Alex Hall]
|
||||||
|
|
||||||
|
|
||||||
0.6.0 (2015-11-10)
|
0.6.0 (2015-11-10)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
- Force proper remote url. [Jose Diaz-Gonzalez]
|
- Force proper remote url. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Improve error handling in case of HTTP errors. [Enrico Tröger]
|
- Improve error handling in case of HTTP errors. [Enrico Tröger]
|
||||||
|
|
||||||
In case of a HTTP status code 404, the returned 'r' was never assigned.
|
In case of a HTTP status code 404, the returned 'r' was never assigned.
|
||||||
In case of URL errors which are not timeouts, we probably should bail
|
In case of URL errors which are not timeouts, we probably should bail
|
||||||
out.
|
out.
|
||||||
|
|
||||||
|
|
||||||
- Add --hooks to also include web hooks into the backup. [Enrico Tröger]
|
- Add --hooks to also include web hooks into the backup. [Enrico Tröger]
|
||||||
|
|
||||||
- Create the user specified output directory if it does not exist.
|
- Create the user specified output directory if it does not exist.
|
||||||
[Enrico Tröger]
|
[Enrico Tröger]
|
||||||
|
|
||||||
Fixes #17.
|
Fixes #17.
|
||||||
|
|
||||||
|
|
||||||
- Add missing auth argument to _get_response() [Enrico Tröger]
|
- Add missing auth argument to _get_response() [Enrico Tröger]
|
||||||
|
|
||||||
When running unauthenticated and Github starts rate-limiting the client,
|
When running unauthenticated and Github starts rate-limiting the client,
|
||||||
github-backup crashes because the used auth variable in _get_response()
|
github-backup crashes because the used auth variable in _get_response()
|
||||||
was not available. This change should fix it.
|
was not available. This change should fix it.
|
||||||
|
|
||||||
|
|
||||||
- Add repository URL to error message for non-existing repositories.
|
- Add repository URL to error message for non-existing repositories.
|
||||||
[Enrico Tröger]
|
[Enrico Tröger]
|
||||||
|
|
||||||
@@ -314,40 +553,28 @@ Other
|
|||||||
|
|
||||||
0.5.0 (2015-10-10)
|
0.5.0 (2015-10-10)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
- Add release script. [Jose Diaz-Gonzalez]
|
- Add release script. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Refactor to both simplify codepath as well as follow PEP8 standards.
|
- Refactor to both simplify codepath as well as follow PEP8 standards.
|
||||||
[Jose Diaz-Gonzalez]
|
[Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Retry 3 times when the connection times out. [Mathijs Jonker]
|
- Retry 3 times when the connection times out. [Mathijs Jonker]
|
||||||
|
|
||||||
- Made unicode output defalut. [Kirill Grushetsky]
|
- Made unicode output defalut. [Kirill Grushetsky]
|
||||||
|
|
||||||
- Import alphabetised. [Kirill Grushetsky]
|
- Import alphabetised. [Kirill Grushetsky]
|
||||||
|
|
||||||
- Preserve Unicode characters in the output file. [Kirill Grushetsky]
|
- Preserve Unicode characters in the output file. [Kirill Grushetsky]
|
||||||
|
|
||||||
Added option to preserve Unicode characters in the output file
|
Added option to preserve Unicode characters in the output file
|
||||||
|
|
||||||
- Josegonzales/python-github-backup#12 Added backup of labels and
|
- Josegonzales/python-github-backup#12 Added backup of labels and
|
||||||
milestones. [aensley]
|
milestones. [aensley]
|
||||||
|
|
||||||
- Fixed indent. [Mathijs Jonker]
|
- Fixed indent. [Mathijs Jonker]
|
||||||
|
|
||||||
- Skip unitialized repo's. [mjonker-embed]
|
- Skip unitialized repo's. [mjonker-embed]
|
||||||
|
|
||||||
These gave me errors which caused mails from crontab.
|
These gave me errors which caused mails from crontab.
|
||||||
|
|
||||||
- Added prefer-ssh. [mjonker-embed]
|
- Added prefer-ssh. [mjonker-embed]
|
||||||
|
|
||||||
Was needed for my back-up setup, code includes this but readme wasn't updated
|
Was needed for my back-up setup, code includes this but readme wasn't updated
|
||||||
|
|
||||||
- Retry API requests which failed due to rate-limiting. [Chris Adams]
|
- Retry API requests which failed due to rate-limiting. [Chris Adams]
|
||||||
|
|
||||||
This allows operation to continue, albeit at a slower pace,
|
This allows operation to continue, albeit at a slower pace,
|
||||||
if you have enough data to trigger the API rate limits
|
if you have enough data to trigger the API rate limits
|
||||||
|
|
||||||
- Logging_subprocess: always log when a command fails. [Chris Adams]
|
- Logging_subprocess: always log when a command fails. [Chris Adams]
|
||||||
|
|
||||||
Previously git clones could fail without any indication
|
Previously git clones could fail without any indication
|
||||||
@@ -357,21 +584,15 @@ Other
|
|||||||
Now a non-zero return code will always output a message to
|
Now a non-zero return code will always output a message to
|
||||||
stderr and will display the executed command so it can be
|
stderr and will display the executed command so it can be
|
||||||
rerun for troubleshooting.
|
rerun for troubleshooting.
|
||||||
|
|
||||||
|
|
||||||
- Switch to using ssh_url. [Chris Adams]
|
- Switch to using ssh_url. [Chris Adams]
|
||||||
|
|
||||||
The previous commit used the wrong URL for a private repo. This was
|
The previous commit used the wrong URL for a private repo. This was
|
||||||
masked by the lack of error loging in logging_subprocess (which will be
|
masked by the lack of error loging in logging_subprocess (which will be
|
||||||
in a separate branch)
|
in a separate branch)
|
||||||
|
|
||||||
|
|
||||||
- Add an option to prefer checkouts over SSH. [Chris Adams]
|
- Add an option to prefer checkouts over SSH. [Chris Adams]
|
||||||
|
|
||||||
This is really useful with private repos to avoid being nagged
|
This is really useful with private repos to avoid being nagged
|
||||||
for credentials for every repository
|
for credentials for every repository
|
||||||
|
|
||||||
|
|
||||||
- Add pull request support. [Kevin Laude]
|
- Add pull request support. [Kevin Laude]
|
||||||
|
|
||||||
Back up reporitory pull requests by passing the --include-pulls
|
Back up reporitory pull requests by passing the --include-pulls
|
||||||
@@ -383,8 +604,6 @@ Other
|
|||||||
|
|
||||||
Pull requests are automatically backed up when the --all argument is
|
Pull requests are automatically backed up when the --all argument is
|
||||||
uesd.
|
uesd.
|
||||||
|
|
||||||
|
|
||||||
- Add GitHub Enterprise support. [Kevin Laude]
|
- Add GitHub Enterprise support. [Kevin Laude]
|
||||||
|
|
||||||
Pass the -H or --github-host argument with a GitHub Enterprise hostname
|
Pass the -H or --github-host argument with a GitHub Enterprise hostname
|
||||||
@@ -394,35 +613,21 @@ Other
|
|||||||
|
|
||||||
0.2.0 (2014-09-22)
|
0.2.0 (2014-09-22)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
- Add support for retrieving repositories. Closes #1. [Jose Diaz-
|
- Add support for retrieving repositories. Closes #1. [Jose Diaz-
|
||||||
Gonzalez]
|
Gonzalez]
|
||||||
|
|
||||||
- Fix PEP8 violations. [Jose Diaz-Gonzalez]
|
- Fix PEP8 violations. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Add authorization to header only if specified by user. [Ioannis
|
- Add authorization to header only if specified by user. [Ioannis
|
||||||
Filippidis]
|
Filippidis]
|
||||||
|
|
||||||
- Fill out readme more. [Jose Diaz-Gonzalez]
|
- Fill out readme more. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Fix import. [Jose Diaz-Gonzalez]
|
- Fix import. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Properly name readme. [Jose Diaz-Gonzalez]
|
- Properly name readme. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Create MANIFEST.in. [Jose Diaz-Gonzalez]
|
- Create MANIFEST.in. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Create .gitignore. [Jose Diaz-Gonzalez]
|
- Create .gitignore. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Create setup.py. [Jose Diaz-Gonzalez]
|
- Create setup.py. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Create requirements.txt. [Jose Diaz-Gonzalez]
|
- Create requirements.txt. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Create __init__.py. [Jose Diaz-Gonzalez]
|
- Create __init__.py. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Create LICENSE.txt. [Jose Diaz-Gonzalez]
|
- Create LICENSE.txt. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Create README.md. [Jose Diaz-Gonzalez]
|
- Create README.md. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
- Create github-backup. [Jose Diaz-Gonzalez]
|
- Create github-backup. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
13
ISSUE_TEMPLATE.md
Normal file
13
ISSUE_TEMPLATE.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Important notice regarding filed issues
|
||||||
|
|
||||||
|
This project already fills my needs, and as such I have no real reason to continue it's development. This project is otherwise provided as is, and no support is given.
|
||||||
|
|
||||||
|
If pull requests implementing bug fixes or enhancements are pushed, I am happy to review and merge them (time permitting).
|
||||||
|
|
||||||
|
If you wish to have a bug fixed, you have a few options:
|
||||||
|
|
||||||
|
- Fix it yourself and file a pull request.
|
||||||
|
- File a bug and hope someone else fixes it for you.
|
||||||
|
- Pay me to fix it (my rate is $200 an hour, minimum 1 hour, contact me via my [github email address](https://github.com/josegonzalez) if you want to go this route).
|
||||||
|
|
||||||
|
In all cases, feel free to file an issue, they may be of help to others in the future.
|
||||||
7
PULL_REQUEST.md
Normal file
7
PULL_REQUEST.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Important notice regarding filed pull requests
|
||||||
|
|
||||||
|
This project already fills my needs, and as such I have no real reason to continue it's development. This project is otherwise provided as is, and no support is given.
|
||||||
|
|
||||||
|
I will attempt to review pull requests at _my_ earliest convenience. If I am unable to get to your pull request in a timely fashion, it is what it is. This repository does not pay any bills, and I am not required to merge any pull request from any individual.
|
||||||
|
|
||||||
|
If you wish to jump my personal priority queue, you may pay me for my time to review. My rate is $200 an hour - minimum 1 hour - feel free contact me via my github email address if you want to go this route.
|
||||||
77
README.rst
77
README.rst
@@ -4,6 +4,8 @@ github-backup
|
|||||||
|
|
||||||
|PyPI| |Python Versions|
|
|PyPI| |Python Versions|
|
||||||
|
|
||||||
|
This project is considered feature complete for the primary maintainer. If you would like a bugfix or enhancement and cannot sponsor the work, pull requests are welcome. Feel free to contact the maintainer for consulting estimates if desired.
|
||||||
|
|
||||||
backup a github user or organization
|
backup a github user or organization
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
@@ -27,18 +29,20 @@ Usage
|
|||||||
|
|
||||||
CLI Usage is as follows::
|
CLI Usage is as follows::
|
||||||
|
|
||||||
github-backup [-h] [-u USERNAME] [-p PASSWORD] [-t TOKEN]
|
github-backup [-h] [-u USERNAME] [-p PASSWORD] [-t TOKEN] [--as-app]
|
||||||
[-o OUTPUT_DIRECTORY] [-i] [--starred] [--all-starred]
|
[-o OUTPUT_DIRECTORY] [-l LOG_LEVEL] [-i] [--starred]
|
||||||
[--watched] [--followers] [--following] [--all]
|
[--all-starred] [--watched] [--followers] [--following]
|
||||||
[--issues] [--issue-comments] [--issue-events] [--pulls]
|
[--all] [--issues] [--issue-comments] [--issue-events]
|
||||||
[--pull-comments] [--pull-commits] [--labels] [--hooks]
|
[--pulls] [--pull-comments] [--pull-commits]
|
||||||
[--milestones] [--repositories] [--bare] [--lfs]
|
[--pull-details] [--labels] [--hooks] [--milestones]
|
||||||
[--wikis] [--gists] [--starred-gists] [--skip-existing]
|
[--repositories] [--bare] [--lfs] [--wikis] [--gists]
|
||||||
[-L [LANGUAGES [LANGUAGES ...]]] [-N NAME_REGEX]
|
[--starred-gists] [--skip-archived] [--skip-existing]
|
||||||
[-H GITHUB_HOST] [-O] [-R REPOSITORY] [-P] [-F]
|
[-L [LANGUAGES ...]] [-N NAME_REGEX] [-H GITHUB_HOST]
|
||||||
[--prefer-ssh] [-v]
|
[-O] [-R REPOSITORY] [-P] [-F] [--prefer-ssh] [-v]
|
||||||
[--keychain-name OSX_KEYCHAIN_ITEM_NAME]
|
[--keychain-name OSX_KEYCHAIN_ITEM_NAME]
|
||||||
[--keychain-account OSX_KEYCHAIN_ITEM_ACCOUNT]
|
[--keychain-account OSX_KEYCHAIN_ITEM_ACCOUNT]
|
||||||
|
[--releases] [--assets] [--exclude [REPOSITORY [REPOSITORY ...]]
|
||||||
|
[--throttle-limit THROTTLE_LIMIT] [--throttle-pause THROTTLE_PAUSE]
|
||||||
USER
|
USER
|
||||||
|
|
||||||
Backup a github account
|
Backup a github account
|
||||||
@@ -54,23 +58,28 @@ CLI Usage is as follows::
|
|||||||
password for basic auth. If a username is given but
|
password for basic auth. If a username is given but
|
||||||
not a password, the password will be prompted for.
|
not a password, the password will be prompted for.
|
||||||
-t TOKEN, --token TOKEN
|
-t TOKEN, --token TOKEN
|
||||||
personal access or OAuth token, or path to token
|
personal access, OAuth, or JSON Web token, or path to
|
||||||
(file://...)
|
token (file://...)
|
||||||
|
--as-app authenticate as github app instead of as a user.
|
||||||
-o OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
|
-o OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
|
||||||
directory at which to backup the repositories
|
directory at which to backup the repositories
|
||||||
|
-l LOG_LEVEL, --log-level LOG_LEVEL
|
||||||
|
log level to use (default: info, possible levels:
|
||||||
|
debug, info, warning, error, critical)
|
||||||
-i, --incremental incremental backup
|
-i, --incremental incremental backup
|
||||||
--starred include JSON output of starred repositories in backup
|
--starred include JSON output of starred repositories in backup
|
||||||
--all-starred include starred repositories in backup
|
--all-starred include starred repositories in backup [*]
|
||||||
--watched include watched repositories in backup
|
--watched include JSON output of watched repositories in backup
|
||||||
--followers include JSON output of followers in backup
|
--followers include JSON output of followers in backup
|
||||||
--following include JSON output of following users in backup
|
--following include JSON output of following users in backup
|
||||||
--all include everything in backup
|
--all include everything in backup (not including [*])
|
||||||
--issues include issues in backup
|
--issues include issues in backup
|
||||||
--issue-comments include issue comments in backup
|
--issue-comments include issue comments in backup
|
||||||
--issue-events include issue events in backup
|
--issue-events include issue events in backup
|
||||||
--pulls include pull requests in backup
|
--pulls include pull requests in backup
|
||||||
--pull-comments include pull request review comments in backup
|
--pull-comments include pull request review comments in backup
|
||||||
--pull-commits include pull request commits in backup
|
--pull-commits include pull request commits in backup
|
||||||
|
--pull-details include more pull request details in backup [*]
|
||||||
--labels include labels in backup
|
--labels include labels in backup
|
||||||
--hooks include hooks in backup (works only when
|
--hooks include hooks in backup (works only when
|
||||||
authenticated)
|
authenticated)
|
||||||
@@ -78,10 +87,10 @@ CLI Usage is as follows::
|
|||||||
--repositories include repository clone in backup
|
--repositories include repository clone in backup
|
||||||
--bare clone bare repositories
|
--bare clone bare repositories
|
||||||
--lfs clone LFS repositories (requires Git LFS to be
|
--lfs clone LFS repositories (requires Git LFS to be
|
||||||
installed, https://git-lfs.github.com)
|
installed, https://git-lfs.github.com) [*]
|
||||||
--wikis include wiki clone in backup
|
--wikis include wiki clone in backup
|
||||||
--gists include gists in backup
|
--gists include gists in backup [*]
|
||||||
--starred-gists include starred gists in backup
|
--starred-gists include starred gists in backup [*]
|
||||||
--skip-existing skip project if a backup directory exists
|
--skip-existing skip project if a backup directory exists
|
||||||
-L [LANGUAGES [LANGUAGES ...]], --languages [LANGUAGES [LANGUAGES ...]]
|
-L [LANGUAGES [LANGUAGES ...]], --languages [LANGUAGES [LANGUAGES ...]]
|
||||||
only allow these languages
|
only allow these languages
|
||||||
@@ -92,8 +101,8 @@ CLI Usage is as follows::
|
|||||||
-O, --organization whether or not this is an organization user
|
-O, --organization whether or not this is an organization user
|
||||||
-R REPOSITORY, --repository REPOSITORY
|
-R REPOSITORY, --repository REPOSITORY
|
||||||
name of repository to limit backup to
|
name of repository to limit backup to
|
||||||
-P, --private include private repositories
|
-P, --private include private repositories [*]
|
||||||
-F, --fork include forked repositories
|
-F, --fork include forked repositories [*]
|
||||||
--prefer-ssh Clone repositories using SSH instead of HTTPS
|
--prefer-ssh Clone repositories using SSH instead of HTTPS
|
||||||
-v, --version show program's version number and exit
|
-v, --version show program's version number and exit
|
||||||
--keychain-name OSX_KEYCHAIN_ITEM_NAME
|
--keychain-name OSX_KEYCHAIN_ITEM_NAME
|
||||||
@@ -102,6 +111,19 @@ CLI Usage is as follows::
|
|||||||
--keychain-account OSX_KEYCHAIN_ITEM_ACCOUNT
|
--keychain-account OSX_KEYCHAIN_ITEM_ACCOUNT
|
||||||
OSX ONLY: account field of password item in OSX
|
OSX ONLY: account field of password item in OSX
|
||||||
keychain that holds the personal access or OAuth token
|
keychain that holds the personal access or OAuth token
|
||||||
|
--releases include release information, not including assets or
|
||||||
|
binaries
|
||||||
|
--assets include assets alongside release information; only
|
||||||
|
applies if including releases
|
||||||
|
--exclude [REPOSITORY [REPOSITORY ...]]
|
||||||
|
names of repositories to exclude from backup.
|
||||||
|
--throttle-limit THROTTLE_LIMIT
|
||||||
|
start throttling of GitHub API requests after this
|
||||||
|
amount of API requests remain
|
||||||
|
--throttle-pause THROTTLE_PAUSE
|
||||||
|
wait this amount of seconds when API request
|
||||||
|
throttling is active (default: 30.0, requires
|
||||||
|
--throttle-limit to be set)
|
||||||
|
|
||||||
|
|
||||||
The package can be used to backup an *entire* organization or repository, including issues and wikis in the most appropriate format (clones for wikis, json files for issues).
|
The package can be used to backup an *entire* organization or repository, including issues and wikis in the most appropriate format (clones for wikis, json files for issues).
|
||||||
@@ -136,10 +158,10 @@ Instructions on how to do this can be found on https://git-lfs.github.com.
|
|||||||
Examples
|
Examples
|
||||||
========
|
========
|
||||||
|
|
||||||
Backup all repositories::
|
Backup all repositories, including private ones::
|
||||||
|
|
||||||
export ACCESS_TOKEN=SOME-GITHUB-TOKEN
|
export ACCESS_TOKEN=SOME-GITHUB-TOKEN
|
||||||
github-backup WhiteHouse --token $ACCESS_TOKEN --organization --output-directory /tmp/white-house --repositories
|
github-backup WhiteHouse --token $ACCESS_TOKEN --organization --output-directory /tmp/white-house --repositories --private
|
||||||
|
|
||||||
Backup a single organization repository with everything else (wiki, pull requests, comments, issues etc)::
|
Backup a single organization repository with everything else (wiki, pull requests, comments, issues etc)::
|
||||||
|
|
||||||
@@ -149,7 +171,16 @@ Backup a single organization repository with everything else (wiki, pull request
|
|||||||
# e.g. git@github.com:docker/cli.git
|
# e.g. git@github.com:docker/cli.git
|
||||||
github-backup $ORGANIZATION -P -t $ACCESS_TOKEN -o . --all -O -R $REPO
|
github-backup $ORGANIZATION -P -t $ACCESS_TOKEN -o . --all -O -R $REPO
|
||||||
|
|
||||||
|
Testing
|
||||||
|
=======
|
||||||
|
|
||||||
|
This project currently contains no unit tests. To run linting::
|
||||||
|
|
||||||
|
pip install flake8
|
||||||
|
flake8 --ignore=E501
|
||||||
|
|
||||||
|
|
||||||
.. |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
|
||||||
|
|||||||
1024
bin/github-backup
1024
bin/github-backup
File diff suppressed because it is too large
Load Diff
@@ -1 +1 @@
|
|||||||
__version__ = '0.22.1'
|
__version__ = "0.43.1"
|
||||||
|
|||||||
1357
github_backup/github_backup.py
Normal file
1357
github_backup/github_backup.py
Normal file
File diff suppressed because it is too large
Load Diff
22
release
22
release
@@ -6,7 +6,7 @@ if [[ ! -f setup.py ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PACKAGE_NAME="$(cat setup.py | grep "name='" | head | cut -d "'" -f2)"
|
PACKAGE_NAME="$(cat setup.py | grep 'name="' | head | cut -d '"' -f2)"
|
||||||
INIT_PACKAGE_NAME="$(echo "${PACKAGE_NAME//-/_}")"
|
INIT_PACKAGE_NAME="$(echo "${PACKAGE_NAME//-/_}")"
|
||||||
PUBLIC="true"
|
PUBLIC="true"
|
||||||
|
|
||||||
@@ -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
|
||||||
@@ -81,18 +86,12 @@ TMPFILE=$(mktemp /tmp/${tempfoo}.XXXXXX) || {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
find_this="__version__ = '$current_version'"
|
find_this="__version__ = \"$current_version\""
|
||||||
replace_with="__version__ = '$next_version'"
|
replace_with="__version__ = \"$next_version\""
|
||||||
|
|
||||||
echo -e "${YELLOW}--->${COLOR_OFF} Updating ${INIT_PACKAGE_NAME}/__init__.py"
|
echo -e "${YELLOW}--->${COLOR_OFF} Updating ${INIT_PACKAGE_NAME}/__init__.py"
|
||||||
sed "s/$find_this/$replace_with/" ${INIT_PACKAGE_NAME}/__init__.py > $TMPFILE && mv $TMPFILE ${INIT_PACKAGE_NAME}/__init__.py
|
sed "s/$find_this/$replace_with/" ${INIT_PACKAGE_NAME}/__init__.py > $TMPFILE && mv $TMPFILE ${INIT_PACKAGE_NAME}/__init__.py
|
||||||
|
|
||||||
find_this="${PACKAGE_NAME}.git@$current_version"
|
|
||||||
replace_with="${PACKAGE_NAME}.git@$next_version"
|
|
||||||
|
|
||||||
echo -e "${YELLOW}--->${COLOR_OFF} Updating README.rst"
|
|
||||||
sed "s/$find_this/$replace_with/" README.rst > $TMPFILE && mv $TMPFILE README.rst
|
|
||||||
|
|
||||||
if [ -f docs/conf.py ]; then
|
if [ -f docs/conf.py ]; then
|
||||||
echo -e "${YELLOW}--->${COLOR_OFF} Updating docs"
|
echo -e "${YELLOW}--->${COLOR_OFF} Updating docs"
|
||||||
find_this="version = '${current_version}'"
|
find_this="version = '${current_version}'"
|
||||||
@@ -125,7 +124,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
|
||||||
|
|
||||||
|
|||||||
31
release-requirements.txt
Normal file
31
release-requirements.txt
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
bleach==6.0.0
|
||||||
|
certifi==2023.5.7
|
||||||
|
charset-normalizer==3.1.0
|
||||||
|
colorama==0.4.6
|
||||||
|
docutils==0.20.1
|
||||||
|
flake8==6.0.0
|
||||||
|
gitchangelog==3.0.4
|
||||||
|
idna==3.4
|
||||||
|
importlib-metadata==6.6.0
|
||||||
|
jaraco.classes==3.2.3
|
||||||
|
keyring==23.13.1
|
||||||
|
markdown-it-py==2.2.0
|
||||||
|
mccabe==0.7.0
|
||||||
|
mdurl==0.1.2
|
||||||
|
more-itertools==9.1.0
|
||||||
|
pkginfo==1.9.6
|
||||||
|
pycodestyle==2.10.0
|
||||||
|
pyflakes==3.0.1
|
||||||
|
Pygments==2.15.1
|
||||||
|
readme-renderer==37.3
|
||||||
|
requests==2.31.0
|
||||||
|
requests-toolbelt==1.0.0
|
||||||
|
restructuredtext-lint==1.4.0
|
||||||
|
rfc3986==2.0.0
|
||||||
|
rich==13.3.5
|
||||||
|
six==1.16.0
|
||||||
|
tqdm==4.65.0
|
||||||
|
twine==4.0.2
|
||||||
|
urllib3==2.0.2
|
||||||
|
webencodings==0.5.1
|
||||||
|
zipp==3.15.0
|
||||||
36
setup.py
36
setup.py
@@ -5,6 +5,7 @@ from github_backup import __version__
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
setup # workaround for pyflakes issue #13
|
setup # workaround for pyflakes issue #13
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
@@ -15,6 +16,7 @@ except ImportError:
|
|||||||
# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
|
# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
|
||||||
try:
|
try:
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
|
|
||||||
multiprocessing
|
multiprocessing
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
@@ -25,24 +27,26 @@ def open_file(fname):
|
|||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='github-backup',
|
name="github-backup",
|
||||||
version=__version__,
|
version=__version__,
|
||||||
author='Jose Diaz-Gonzalez',
|
author="Jose Diaz-Gonzalez",
|
||||||
author_email='github-backup@josediazgonzalez.com',
|
author_email="github-backup@josediazgonzalez.com",
|
||||||
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",
|
||||||
'License :: OSI Approved :: MIT License',
|
"License :: OSI Approved :: MIT License",
|
||||||
'Programming Language :: Python :: 2.7',
|
"Programming Language :: Python :: 3.5",
|
||||||
'Programming Language :: Python :: 3.5',
|
"Programming Language :: Python :: 3.6",
|
||||||
'Programming Language :: Python :: 3.6',
|
"Programming Language :: Python :: 3.7",
|
||||||
|
"Programming Language :: Python :: 3.8",
|
||||||
],
|
],
|
||||||
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(),
|
||||||
install_requires=open_file('requirements.txt').readlines(),
|
long_description_content_type="text/x-rst",
|
||||||
|
install_requires=open_file("requirements.txt").readlines(),
|
||||||
zip_safe=True,
|
zip_safe=True,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user