More and more projects are switching their repositories to use the
'main' branch instead of the 'master' branch. This also includes many
Linux upstream trees as well. Some trees are even removing their
'master' branches already.
I think this is becoming more and more mainstream and expected of
projects, so we should do the same.
References: https://openwrt.org/voting/2023-02-27
Signed-off-by: Paul Spooren <[email protected]>
Signed-off-by: Petr Štetiar <[email protected]> [commit facelift]
[repo]
url = https://git.openwrt.org/openwrt/openwrt.git
-branch = master
+branch = main
[rsync]
binary_url = upload@rsync-server::data/bin
[branch openwrt-22.03]
name = openwrt-22.03
-[branch master]
-name = master
+[branch main]
+name = main
[worker 1]
phase = 1
def IsNoMasterBuild(step):
- return step.getProperty("branch") != "master"
+ return step.getProperty("branch") != "main"
def IsUsignEnabled(step):
if re.match(r"^[^-]+-[0-9]+\.[0-9]+$", branch):
return branch.split("-")[1]
else:
- return "master"
+ return "main"
@properties.renderer
r"^v[0-9]+\.[0-9]+\.[0-9]+(?:-rc[0-9]+)?$", props["tag"]
):
return "%s/" % props["tag"][1:]
- elif basever != "master":
+ elif basever != "main":
return "%s-SNAPSHOT/" % basever
else:
return ""
[repo]
url = https://git.openwrt.org/openwrt/openwrt.git
-branch = master
+branch = main
[rsync]
rsync_defopts = ["-4", "-v", "--timeout=120"]
repo_url = ini.get("repo", "url")
-repo_branch = "master"
+repo_branch = "main"
if ini.has_option("repo", "branch"):
repo_branch = ini.get("repo", "branch")
if parts[0].startswith("src-git"):
feeds.append(parts)
url = parts[2].strip().split(';')
- branch = url[1] if len(url) > 1 else 'master'
+ branch = url[1] if len(url) > 1 else 'main'
feedbranches[url[0]] = branch
c['change_source'].append(GitPoller(url[0], branch=branch, workdir='%s/%s.git' %(os.getcwd(), parts[1]), pollinterval=300))
prev_branch="$(git symbolic-ref -q HEAD)"
-if [ "$prev_branch" != "refs/heads/master" ]; then
- echo "Expecting current branch name to be \"master\"," \
+if [ "$prev_branch" != "refs/heads/main" ]; then
+ echo "Expecting current branch name to be \"main\"," \
"but it is \"${prev_branch#refs/heads/}\" - aborting."
exit 1
if [ -z "$ref" ]; then
echo "WARNING: Feed \"$name\" provides no" \
- "\"lede-$version\" branch - using master!" >&2
+ "\"lede-$version\" branch - using main!" >&2
else
url="$url;lede-$version"
fi