Skip to content

Commit

Permalink
Rename master to main
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Jun 23, 2021
1 parent 13be6da commit aab26cb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
#
name: Test

# Trigger the workflow's on all PRs but only on pushed tags or commits to
# main/master branch to avoid PRs developed in a GitHub fork's dedicated branch
# to trigger.
# Trigger the workflow's on all PRs but only on pushed tags or commits to main
# branch to avoid PRs developed in a GitHub fork's dedicated branch to trigger.
on:
pull_request:
push:
Expand Down
14 changes: 7 additions & 7 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ For you to follow along according to these instructions, you need:
`github-activity --kind pr jupyterhub/chartpress` after setting up
credentials as described in the project's README.md file.

1. Once the changelog is up to date, checkout master and make sure it is up to date and clean.
1. Once the changelog is up to date, checkout main and make sure it is up to date and clean.

```bash
ORIGIN=${ORIGIN:-origin} # set to the canonical remote, e.g. 'upstream' if 'origin' is not the official repo
git checkout master
git fetch $ORIGIN master
git reset --hard $ORIGIN/master
git checkout main
git fetch $ORIGIN main
git reset --hard $ORIGIN/main
# WARNING! This next command deletes any untracked files in the repo
git clean -xfd
```
Expand All @@ -45,11 +45,11 @@ For you to follow along according to these instructions, you need:
bump2version --no-tag patch
```

1. Push your two commits to master along with the annotated tags referencing
commits on master.
1. Push your two commits to main along with the annotated tags referencing
commits on main.

```
git push --follow-tags $ORIGIN master
git push --follow-tags $ORIGIN main
```

## Manually uploading to PyPI
Expand Down
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def pytest_configure(config):
def git_repo(monkeypatch):
"""
This fixture provides a temporary git repo with two branches initialized.
master contains a test helm chart copied from tests/test_helm_chart, and
main contains a test helm chart copied from tests/test_helm_chart, and
gh-pages that contains the content of tests/test_helm_chart_repo.
"""
with tempfile.TemporaryDirectory() as temp_dir:
Expand All @@ -42,9 +42,9 @@ def git_repo(monkeypatch):
r.git.add(all=True)
r.index.commit("initial commit")

# enter blank branch master
# enter blank branch main
# copy content of tests/test_helm_chart and commit it
r.git.checkout("--orphan", "master")
r.git.checkout("--orphan", "main")
copy_tree(test_helm_chart_dir, temp_dir)
r.git.add(all=True)
r.index.commit("initial commit")
Expand Down
12 changes: 6 additions & 6 deletions tests/test_repo_interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ def test_chartpress_run(git_repo, capfd):
automatic_helm_chart_repo_commit = git_repo.commit("HEAD")
assert "test added --extra-message" in automatic_helm_chart_repo_commit.message

# return to master
git_repo.git.checkout("master")
# return to main
git_repo.git.checkout("main")
git_repo.git.stash("pop")

# verify usage of --publish-chart when the chart version exists in the chart
Expand Down Expand Up @@ -192,8 +192,8 @@ def test_chartpress_run(git_repo, capfd):
assert f"version: {tag}" in index_yaml
assert f"version: {tag}.n001.h{sha}" in index_yaml

# return to master
git_repo.git.checkout("master")
# return to main
git_repo.git.checkout("main")
git_repo.git.stash("pop")


Expand Down Expand Up @@ -260,7 +260,7 @@ def test_chartpress_run_bare_minimum(git_repo_bare_minimum, capfd):
have a images key in the chartpress.yaml configuration for example.
"""
r = git_repo_bare_minimum
sha = r.heads.master.commit.hexsha[:7]
sha = r.heads.main.commit.hexsha[:7]
tag = f"0.0.1-n002.h{sha}"

out = _capture_output([], capfd)
Expand All @@ -274,7 +274,7 @@ def test_chartpress_run_alternative(git_repo_alternative, capfd):
into a single chartpress.yaml file.
"""
r = git_repo_alternative
sha = r.heads.master.commit.hexsha[:7]
sha = r.heads.main.commit.hexsha[:7]

# verify usage of --tag with a prefix v
tag = f"v1.0.0"
Expand Down

0 comments on commit aab26cb

Please sign in to comment.