Skip to content

Commit

Permalink
Migrate references of master to main (#282)
Browse files Browse the repository at this point in the history
* Update release script

* Migrate all references of master to main
  • Loading branch information
rogebrd authored Nov 3, 2020
1 parent 063aea5 commit ef994be
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/spec_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
title: 'Automated Spec Update'
body: |
${{ steps.git-diff.outputs.commit}}
base: 'master'
base: 'main'
team-reviewers: |
owners
maintainers
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ The documentation will be built into `build/html`.

[issues]: https://github.com/dropbox/dropbox-sdk-python/issues
[pr]: https://github.com/dropbox/dropbox-sdk-python/pulls
[coc]: https://github.com/dropbox/dropbox-sdk-python/blob/master/CODE_OF_CONDUCT.md
[license]: https://github.com/dropbox/dropbox-sdk-python/blob/master/LICENSE

This comment has been minimized.

Copy link
@pickonone3

pickonone3 Aug 21, 2021

Help

[coc]: https://github.com/dropbox/dropbox-sdk-python/blob/main/CODE_OF_CONDUCT.md
[license]: https://github.com/dropbox/dropbox-sdk-python/blob/main/LICENSE
[cla]: https://opensource.dropbox.com/cla/
18 changes: 9 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.. image:: https://img.shields.io/pypi/v/dropbox.svg
:target: https://pypi.python.org/pypi/dropbox

.. image:: https://codecov.io/gh/dropbox/dropbox-sdk-python/branch/master/graph/badge.svg
.. image:: https://codecov.io/gh/dropbox/dropbox-sdk-python/branch/main/graph/badge.svg
:target: https://codecov.io/gh/dropbox/dropbox-sdk-python

The offical Dropbox SDK for Python.
Expand Down Expand Up @@ -43,12 +43,12 @@ Examples
We provide `Examples`_ to help get you started with a lot of the basic functionality in the SDK.

- **OAuth**
- `Commandline OAuth Basic <https://github.com/dropbox/dropbox-sdk-python/blob/master/example/oauth/commandline-oauth.py>`_ - Shows a simple example of commandline oauth (no redirect).
- `Commandline OAuth Scopes <https://github.com/dropbox/dropbox-sdk-python/blob/master/example/oauth/commandline-oauth-scopes.py>`_ - Shows a simple example of commandline oauth using scopes.
- `Commandline OAuth PKCE <https://github.com/dropbox/dropbox-sdk-python/blob/master/example/oauth/commandline-oauth-pkce.py>`_ - Shows a simple example of commandline oauth using PKCE.
- `Commandline OAuth Basic <https://github.com/dropbox/dropbox-sdk-python/blob/main/example/oauth/commandline-oauth.py>`_ - Shows a simple example of commandline oauth (no redirect).
- `Commandline OAuth Scopes <https://github.com/dropbox/dropbox-sdk-python/blob/main/example/oauth/commandline-oauth-scopes.py>`_ - Shows a simple example of commandline oauth using scopes.
- `Commandline OAuth PKCE <https://github.com/dropbox/dropbox-sdk-python/blob/main/example/oauth/commandline-oauth-pkce.py>`_ - Shows a simple example of commandline oauth using PKCE.
- **Other Examples**
- `Updown <https://github.com/dropbox/dropbox-sdk-python/blob/master/example/updown.py>`_ - Sample application that uploads the contents of your ``Downloads`` folder to Dropbox.
- `Backup and Restore <https://github.com/dropbox/dropbox-sdk-python/tree/master/example/back-up-and-restore>`_ - Sample application that shows how you can backup a file and restore previous versions if the file was modified/corrupted in any way.
- `Updown <https://github.com/dropbox/dropbox-sdk-python/blob/main/example/updown.py>`_ - Sample application that uploads the contents of your ``Downloads`` folder to Dropbox.
- `Backup and Restore <https://github.com/dropbox/dropbox-sdk-python/tree/main/example/back-up-and-restore>`_ - Sample application that shows how you can backup a file and restore previous versions if the file was modified/corrupted in any way.

Getting Help
============
Expand All @@ -65,9 +65,9 @@ This SDK is distributed under the MIT license, please see `LICENSE`_ for more in
.. _logo: {logo_link}
.. _repo: https://github.com/dropbox/dropbox-sdk-python
.. _`Read The Docs`: http://dropbox-sdk-python.readthedocs.org
.. _`Examples`: https://github.com/dropbox/dropbox-sdk-python/tree/master/example
.. _LICENSE: https://github.com/dropbox/dropbox-sdk-python/blob/master/LICENSE
.. _CONTRIBUTING.md: https://github.com/dropbox/dropbox-sdk-python/blob/master/CONTRIBUTING.md
.. _`Examples`: https://github.com/dropbox/dropbox-sdk-python/tree/main/example
.. _LICENSE: https://github.com/dropbox/dropbox-sdk-python/blob/main/LICENSE
.. _CONTRIBUTING.md: https://github.com/dropbox/dropbox-sdk-python/blob/main/CONTRIBUTING.md
.. _Developer Console: https://dropbox.com/developers/apps
.. _OAuth Guide: https://www.dropbox.com/lp/developers/reference/oauth-guide
.. _`Dropbox Support`: https://www.dropbox.com/developers/contact
2 changes: 1 addition & 1 deletion dropbox/dropbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'create_session',
]

# This should always be 0.0.0 in master. Only update this after tagging
# This should always be 0.0.0 in main. Only update this after tagging
# before release.
__version__ = '0.0.0'

Expand Down
4 changes: 2 additions & 2 deletions dropbox/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class DropboxOAuth2FlowNoRedirect(DropboxOAuth2FlowBase):
OAuth 2 authorization helper for apps that can't provide a redirect URI
(such as the command-line example apps).
See examples under `example/oauth <https://github.com/dropbox/dropbox-sdk-python/tree/master/
See examples under `example/oauth <https://github.com/dropbox/dropbox-sdk-python/tree/main/
example/oauth>`_
"""
Expand Down Expand Up @@ -352,7 +352,7 @@ class DropboxOAuth2Flow(DropboxOAuth2FlowBase):
OAuth 2 has a two-step authorization process. The first step is having the user authorize your
app. The second involves getting an OAuth 2 access token from Dropbox.
See examples under `example/oauth <https://github.com/dropbox/dropbox-sdk-python/tree/master/
See examples under `example/oauth <https://github.com/dropbox/dropbox-sdk-python/tree/main/
example/oauth>`_
"""
Expand Down
2 changes: 1 addition & 1 deletion example/back-up-and-restore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In this example, it contains a simple string of text (initially "original").

# API usage
## New v2 endpoints
This app uses the Dropbox API v2 endpoints files_upload, files_restore, files_download_to_file, and files_list_revisions. See more here: http://dropbox-sdk-python.readthedocs.org/en/master/
This app uses the Dropbox API v2 endpoints files_upload, files_restore, files_download_to_file, and files_list_revisions. See more here: http://dropbox-sdk-python.readthedocs.org/en/main/

## Error checking
This example also shows you how to do specific error handling with the new API v2 exceptions. In the backup() function, you can see how to check for a specific kind of API Error.
6 changes: 3 additions & 3 deletions scripts/update_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ else
set -ex
NEW_VERSION=$1

git checkout master
git checkout main

This comment has been minimized.

Copy link
@pickonone3

pickonone3 Aug 21, 2021

Where to start on restoring what was taken

git reset --hard HEAD
git checkout -b "tmp-release-${NEW_VERSION}"

perl -pi -e "s/^__version__ = .*$/__version__ = '$1'/g" dropbox/dropbox.py
perl -pi -e 's/(\?branch=)master$/\1\v'$1'/g ;' -e 's/(\?version=)latest$/\1\stable/g ;' -e 's/(\/en\/)latest(\/)$/\1\stable\2/g ;' -e 's/(\[Latest) (Documentation\])$/\1 Release \2/g ;' README.rst
perl -pi -e 's/(\?branch=)main$/\1\v'$1'/g ;' -e 's/(\?version=)latest$/\1\stable/g ;' -e 's/(\/en\/)latest(\/)$/\1\stable\2/g ;' -e 's/(\[Latest) (Documentation\])$/\1 Release \2/g ;' README.rst

git add -u
git commit -m "${NEW_VERSION} release"
git tag "v${NEW_VERSION}" -m "${NEW_VERSION} release"

git checkout master
git checkout main
git branch -D "tmp-release-${NEW_VERSION}"

git push origin
Expand Down

0 comments on commit ef994be

Please sign in to comment.