master branch -> main branch

This commit is contained in:
Maximilian Hils 2021-03-16 16:17:27 +01:00
parent c996f1ee74
commit ead33008bc
14 changed files with 27 additions and 26 deletions

View File

@ -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!

View File

@ -1,3 +1,4 @@
User-agent: *
Disallow: /archive/
Disallow: /master/
Disallow: /dev/

View File

@ -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

View File

@ -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(

View File

@ -48,7 +48,7 @@ print(f"""
### Built-In Addons
Much of mitmproxys 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).
-------------------------

View File

@ -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.

View File

@ -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.

View File

@ -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)

View File

@ -1,7 +1,7 @@
{{ if and .IsPage (ne .Type "api") (not (getenv "DOCS_ARCHIVE")) }}
<a class="button is-small is-outlined is-link is-pulled-right"
target="_blank"
href="https://github.com/mitmproxy/mitmproxy/blob/master/docs/src/content/{{ .File.Path }}"
href="https://github.com/mitmproxy/mitmproxy/blob/main/docs/src/content/{{ .File.Path }}"
>
Edit on GitHub
</a>

View File

@ -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.

View File

@ -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,
])

View File

@ -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.

View File

@ -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__))

View File

@ -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,