phase1,phase2: s/master/main for phase{1,2}
authorPaul Spooren <mail@aparcar.org>
Tue, 23 May 2023 21:02:48 +0000 (23:02 +0200)
committerPetr Štetiar <ynezz@true.cz>
Sat, 13 Apr 2024 04:52:44 +0000 (04:52 +0000)
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 <mail@aparcar.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit facelift]
docker/config.ini
phase1/config.ini.example
phase1/master.cfg
phase2/config.ini.example
phase2/master.cfg
scripts/makebranch.sh

index 25543f225b1ee7828f03160d31141095e54b8b2a..6278d3decbc098a2c841faf9d616d33dfa183f89 100644 (file)
@@ -27,7 +27,7 @@ persistent = false
 
 [repo]
 url = https://git.openwrt.org/openwrt/openwrt.git
-branch = master
+branch = main
 
 [rsync]
 binary_url = upload@rsync-server::data/bin
index d7262bd0bbd400610360427fec2a42290f88c171..267184f01594584fbfd74aaa00b3163d551e1fcd 100644 (file)
@@ -49,8 +49,8 @@ config_seed = # Seed configuration
 [branch openwrt-22.03]
 name = openwrt-22.03
 
-[branch master]
-name = master
+[branch main]
+name = main
 
 [worker 1]
 phase = 1
index e29bb9dd9f062ad2f59f2796f2d4936f163b8c6b..4e7cbc109152bb953f84e614904ed731ef842a90 100644 (file)
@@ -550,7 +550,7 @@ c["schedulers"].append(
 
 
 def IsNoMasterBuild(step):
-    return step.getProperty("branch") != "master"
+    return step.getProperty("branch") != "main"
 
 
 def IsUsignEnabled(step):
@@ -577,7 +577,7 @@ def GetBaseVersion(branch):
     if re.match(r"^[^-]+-[0-9]+\.[0-9]+$", branch):
         return branch.split("-")[1]
     else:
-        return "master"
+        return "main"
 
 
 @properties.renderer
@@ -588,7 +588,7 @@ def GetVersionPrefix(props):
         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 ""
index b7e75d330f3bdfccdec32bd5863487bfdf1c637a..ec0e6dbfc355cec938cc05867d4ac490de261fa4 100644 (file)
@@ -20,7 +20,7 @@ git_ssh_key = -----BEGIN RSA PRIVATE KEY-----
 
 [repo]
 url = https://git.openwrt.org/openwrt/openwrt.git
-branch = master
+branch = main
 
 [rsync]
 binary_url = user@example.org::upload-packages
index 23a67f7324e3595170f91f71f4d2de48bab10657..c399c66eb0fc9467e250e85d6b2652d99388abab 100644 (file)
@@ -129,7 +129,7 @@ if ini.has_option("rsync", "sdk_pattern"):
 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")
@@ -177,7 +177,7 @@ def parse_feed_entry(line):
        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))
 
index e92c04c1bf281cbc20d4da00ef9fbeb03184a426..355014cab6cee1592d1e30dfba183e4514a59670 100755 (executable)
@@ -77,8 +77,8 @@ githash="$(git log --format=%h -1)"
 
 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
@@ -101,7 +101,7 @@ while read type name url; do
 
                                        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