Skip to content

Commit

Permalink
Fix scripts/release.py to use main instead of master
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Aug 25, 2021
1 parent e04816f commit fc6395c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@


def create_branch(version):
"""Create a fresh branch from upstream/master"""
"""Create a fresh branch from upstream/main"""
repo = Repo.init(".")
if repo.is_dirty(untracked_files=True):
raise RuntimeError("Repository is dirty, please commit/stash your changes.")

branch_name = f"release-{version}"
print(f"{Fore.CYAN}Create {branch_name} branch from upstream master")
print(f"{Fore.CYAN}Create {branch_name} branch from upstream main")
upstream = get_upstream(repo)
upstream.fetch()
release_branch = repo.create_head(branch_name, upstream.refs.master, force=True)
release_branch = repo.create_head(branch_name, upstream.refs.main, force=True)
release_branch.checkout()
return repo

Expand Down

0 comments on commit fc6395c

Please sign in to comment.