diff --git a/README.md b/README.md index df2a86f2a..2ffcb4be7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # mitmproxy -[![Continuous Integration Status](https://github.com/mitmproxy/mitmproxy/workflows/CI/badge.svg?branch=master)](https://github.com/mitmproxy/mitmproxy/actions?query=branch%3Amaster) -[![Coverage Status](https://shields.mitmproxy.org/codecov/c/github/mitmproxy/mitmproxy/master.svg?label=codecov)](https://codecov.io/gh/mitmproxy/mitmproxy) +[![Continuous Integration Status](https://github.com/mitmproxy/mitmproxy/workflows/CI/badge.svg?branch=main)](https://github.com/mitmproxy/mitmproxy/actions?query=branch%3Amain) +[![Coverage Status](https://shields.mitmproxy.org/codecov/c/github/mitmproxy/mitmproxy/main.svg?label=codecov)](https://codecov.io/gh/mitmproxy/mitmproxy) [![Latest Version](https://shields.mitmproxy.org/pypi/v/mitmproxy.svg)](https://pypi.python.org/pypi/mitmproxy) [![Supported Python versions](https://shields.mitmproxy.org/pypi/pyversions/mitmproxy.svg)](https://pypi.python.org/pypi/mitmproxy) @@ -26,7 +26,7 @@ General information, tutorials, and precompiled binaries can be found on the mit The documentation for mitmproxy is available on our website: [![mitmproxy documentation stable](https://shields.mitmproxy.org/badge/docs-stable-brightgreen.svg)](https://docs.mitmproxy.org/stable/) -[![mitmproxy documentation master](https://shields.mitmproxy.org/badge/docs-master-brightgreen.svg)](https://docs.mitmproxy.org/master/) +[![mitmproxy documentation dev](https://shields.mitmproxy.org/badge/docs-dev-brightgreen.svg)](https://docs.mitmproxy.org/main/) If you have questions on how to use mitmproxy, please ask them on StackOverflow! diff --git a/docs/bucketassets/robots.txt b/docs/bucketassets/robots.txt index da4c47d6d..2ecca210e 100644 --- a/docs/bucketassets/robots.txt +++ b/docs/bucketassets/robots.txt @@ -1,3 +1,4 @@ User-agent: * Disallow: /archive/ -Disallow: /master/ \ No newline at end of file +Disallow: /master/ +Disallow: /dev/ diff --git a/docs/ci.sh b/docs/ci.sh index 1a9880061..770ad6ace 100755 --- a/docs/ci.sh +++ b/docs/ci.sh @@ -4,14 +4,14 @@ set -o errexit set -o pipefail # set -o xtrace -# This script gets run from CI to render and upload docs for the master branch. +# This script gets run from CI to render and upload docs for the main branch. ./build.py # Only upload if we have defined credentials - we only have these defined for # trusted commits (i.e. not PRs). -if [[ -n "${AWS_ACCESS_KEY_ID}" && $GITHUB_REF == "refs/heads/master" ]]; then - aws s3 sync --delete --acl public-read ./public s3://docs.mitmproxy.org/master +if [[ -n "${AWS_ACCESS_KEY_ID}" && $GITHUB_REF == "refs/heads/main" ]]; then + aws s3 sync --delete --acl public-read ./public s3://docs.mitmproxy.org/dev aws cloudfront create-invalidation --distribution-id E1TH3USJHFQZ5Q \ - --paths "/master/*" + --paths "/dev/*" fi diff --git a/docs/scripts/api-render.py b/docs/scripts/api-render.py index 1991b22dc..f7c58d091 100644 --- a/docs/scripts/api-render.py +++ b/docs/scripts/api-render.py @@ -12,7 +12,7 @@ if os.environ.get("DOCS_ARCHIVE", False): edit_url_map = {} else: edit_url_map = { - "mitmproxy": "https://github.com/mitmproxy/mitmproxy/blob/master/mitmproxy/", + "mitmproxy": "https://github.com/mitmproxy/mitmproxy/blob/main/mitmproxy/", } pdoc.render.configure( diff --git a/docs/scripts/examples.py b/docs/scripts/examples.py index 566df2511..cd69f6b05 100755 --- a/docs/scripts/examples.py +++ b/docs/scripts/examples.py @@ -48,7 +48,7 @@ print(f""" ### Built-In Addons Much of mitmproxy’s own functionality is defined in -[a suite of built-in addons](https://github.com/mitmproxy/mitmproxy/tree/master/mitmproxy/addons), +[a suite of built-in addons](https://github.com/mitmproxy/mitmproxy/tree/main/mitmproxy/addons), implementing everything from functionality like anticaching and sticky cookies to our onboarding webapp. The built-in addons make for instructive reading, and you will quickly see that quite complex functionality can often boil down to a very small, completely self-contained modules. @@ -57,7 +57,7 @@ can often boil down to a very small, completely self-contained modules. ### Additional Community Examples Additional examples contributed by the mitmproxy community can be found -[on GitHub](https://github.com/mitmproxy/mitmproxy/tree/master/examples/contrib). +[on GitHub](https://github.com/mitmproxy/mitmproxy/tree/main/examples/contrib). ------------------------- diff --git a/docs/src/content/addons-overview.md b/docs/src/content/addons-overview.md index 3af76ab22..fc29c461f 100644 --- a/docs/src/content/addons-overview.md +++ b/docs/src/content/addons-overview.md @@ -9,7 +9,7 @@ menu: Mitmproxy's addon mechanism is an exceptionally powerful part of mitmproxy. In fact, much of mitmproxy's own functionality is defined in -[a suite of built-in addons](https://github.com/mitmproxy/mitmproxy/tree/master/mitmproxy/addons), +[a suite of built-in addons](https://github.com/mitmproxy/mitmproxy/tree/main/mitmproxy/addons), implementing everything from functionality like [anticaching]({{< relref "overview-features#anticache" >}}) and [sticky cookies]({{< relref "overview-features#sticky-cookies" >}}) to our onboarding webapp. diff --git a/docs/src/content/concepts-howmitmproxyworks.md b/docs/src/content/concepts-howmitmproxyworks.md index 1330be8c1..3bb8a95b5 100644 --- a/docs/src/content/concepts-howmitmproxyworks.md +++ b/docs/src/content/concepts-howmitmproxyworks.md @@ -192,7 +192,7 @@ this introduces the second component required for working transparent proxying: a host module that knows how to retrieve the original destination address from the router. In mitmproxy, this takes the form of a built-in set of -[modules](https://github.com/mitmproxy/mitmproxy/tree/master/mitmproxy/platform) +[modules](https://github.com/mitmproxy/mitmproxy/tree/main/mitmproxy/platform) that know how to talk to each platform's redirection mechanism. Once we have this information, the process is fairly straight-forward. diff --git a/docs/src/content/overview-installation.md b/docs/src/content/overview-installation.md index e92663b7b..1682b682f 100644 --- a/docs/src/content/overview-installation.md +++ b/docs/src/content/overview-installation.md @@ -49,8 +49,8 @@ instructions for Linux. ### Development Setup If you would like to install mitmproxy directly from source code or the -GitHub master branch, please see the our -[CONTRIBUTING.md](https://github.com/mitmproxy/mitmproxy/blob/master/CONTRIBUTING.md) +GitHub main branch, please see the our +[CONTRIBUTING.md](https://github.com/mitmproxy/mitmproxy/blob/main/CONTRIBUTING.md) on GitHub. ### Installation from the Python Package Index (PyPI) diff --git a/docs/src/layouts/partials/edit-on-github.html b/docs/src/layouts/partials/edit-on-github.html index a5de09108..d89630fca 100644 --- a/docs/src/layouts/partials/edit-on-github.html +++ b/docs/src/layouts/partials/edit-on-github.html @@ -1,7 +1,7 @@ {{ if and .IsPage (ne .Type "api") (not (getenv "DOCS_ARCHIVE")) }} Edit on GitHub diff --git a/release/README.md b/release/README.md index 2dba4816b..336777205 100644 --- a/release/README.md +++ b/release/README.md @@ -49,13 +49,13 @@ These steps assume you are on the correct branch and have a git remote called `o - The website does not need to be updated for patch releases. New versions are automatically picked up once they are on the download server. - Update version here: - https://github.com/mitmproxy/www/blob/master/src/config.toml + https://github.com/mitmproxy/www/blob/main/src/config.toml - Update docs menu here: - https://github.com/mitmproxy/www/blob/master/src/themes/mitmproxy/layouts/partials/header.html + https://github.com/mitmproxy/www/blob/main/src/themes/mitmproxy/layouts/partials/header.html - Run `./build && ./upload-test`. - If everything looks alright at https://www-test.mitmproxy.org, run `./upload-prod`. ### Prepare for next release -- Last but not least, bump the major version on master in - [https://github.com/mitmproxy/mitmproxy/blob/master/mitmproxy/version.py](mitmproxy/version.py) and add a `.dev` suffix. +- Last but not least, bump the major version on main in + [https://github.com/mitmproxy/mitmproxy/blob/main/mitmproxy/version.py](mitmproxy/version.py) and add a `.dev` suffix. diff --git a/release/cibuild.py b/release/cibuild.py index 0353da5e9..d26265abc 100755 --- a/release/cibuild.py +++ b/release/cibuild.py @@ -127,7 +127,7 @@ class BuildEnviron: @property def docker_tag(self) -> str: - if self.branch == "master": + if self.branch == "main": t = "dev" else: t = self.version @@ -214,7 +214,7 @@ class BuildEnviron: @property def should_upload_docker(self) -> bool: return all([ - (self.is_prod_release or self.branch == "master"), + (self.is_prod_release or self.branch == "main"), self.should_build_docker, self.has_docker_creds, ]) diff --git a/release/docker/DockerHub-README.md b/release/docker/DockerHub-README.md index df9834b80..688174fc2 100644 --- a/release/docker/DockerHub-README.md +++ b/release/docker/DockerHub-README.md @@ -38,7 +38,7 @@ For further details, please consult the mitmproxy [documentation](http://docs.mi The available release tags can be seen [here](https://hub.docker.com/r/mitmproxy/mitmproxy/tags/). -* `master` always tracks the git-master branch and represents the unstable development tree. +* `dev` always tracks the git-master branch and represents the unstable development tree. * `latest` always points to the same image as the most recent stable release, including bugfix releases (e.g., `4.0.0` and `4.0.1`). * `X.Y.Z` tags contain the mitmproxy release with this version number. diff --git a/setup.py b/setup.py index fd7918f14..dfebe40fb 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from codecs import open import re from setuptools import setup, find_packages -# Based on https://github.com/pypa/sampleproject/blob/master/setup.py +# Based on https://github.com/pypa/sampleproject/blob/main/setup.py # and https://python-packaging-user-guide.readthedocs.org/ here = os.path.abspath(os.path.dirname(__file__)) diff --git a/test/release/test_cibuild.py b/test/release/test_cibuild.py index 9bbc4433e..26a2c3348 100644 --- a/test/release/test_cibuild.py +++ b/test/release/test_cibuild.py @@ -17,7 +17,7 @@ def test_buildenviron_common(): be = cibuild.BuildEnviron( system="Linux", root_dir=root, - branch="master", + branch="main", ) assert be.release_dir == be.root_dir / "release" assert be.dist_dir == be.root_dir / "release" / "dist" @@ -57,7 +57,7 @@ def test_buildenviron_commit(): be = cibuild.BuildEnviron( system="Linux", root_dir=root, - branch="master", + branch="main", is_pull_request=False, should_build_wheel=True, should_build_pyinstaller=True,