Apache Lucene open-source search software
LUCENE-9809: replace 'master' with 'main' in release wizard (#305)
Christine Poerschke57524c6a5e72
diff --git a/dev-tools/scripts/releaseWizard.py b/dev-tools/scripts/releaseWizard.pyindex 694b0d33d24..b73ef4be4d0 100755--- a/dev-tools/scripts/releaseWizard.py+++ b/dev-tools/scripts/releaseWizard.py@@ -116,7 +116,7 @@ def expand_jinja(text, vars=None):'set_java_home': set_java_home,'latest_version': state.get_latest_version(),'latest_lts_version': state.get_latest_lts_version(),- 'master_version': state.get_master_version(),+ 'main_version': state.get_main_version(),'mirrored_versions': state.get_mirrored_versions(),'mirrored_versions_to_delete': state.get_mirrored_versions_to_delete(),'home': os.path.expanduser("~")@@ -361,7 +361,7 @@ class ReleaseState:raise Exception("Release version %s must have same major version as current minor or lts release")return [ver for ver in versions if ver not in to_keep]- def get_master_version(self):+ def get_main_version(self):v = Version.parse(self.get_latest_version())return "%s.%s.%s" % (v.major + 1, 0, 0)@@ -390,10 +390,10 @@ class ReleaseState:if not ver.is_minor_release():sys.exit("You can only release minor releases from an existing stable branch")elif branch_type == BranchType.unstable:- if not branch == 'master':+ if not branch == 'main':sys.exit("Incompatible branch and branch_type")if not ver.is_major_release():- sys.exit("You can only release a new major version from master branch")+ sys.exit("You can only release a new major version from main branch")if not getScriptVersion() == release_version:print("WARNING: Expected release version %s when on branch %s, but got %s" % (getScriptVersion(), branch, release_version))@@ -401,7 +401,7 @@ class ReleaseState:def get_base_branch_name(self):v = Version.parse(self.release_version)if v.is_major_release():- return 'master'+ return 'main'elif v.is_minor_release():return self.get_stable_branch_name()elif v.major == Version.parse(self.get_latest_version()).major:@@ -569,7 +569,7 @@ class ReleaseState:def get_stable_branch_name(self):if self.release_type == 'major':- v = Version.parse(self.get_master_version())+ v = Version.parse(self.get_main_version())else:v = Version.parse(self.get_latest_version())return "branch_%sx" % v.majordiff --git a/dev-tools/scripts/releaseWizard.yaml b/dev-tools/scripts/releaseWizard.yamlindex 42e5af765b4..5d2765ea3c4 100644--- a/dev-tools/scripts/releaseWizard.yaml+++ b/dev-tools/scripts/releaseWizard.yaml@@ -410,7 +410,7 @@ groups:cmd: "{{ gradle_cmd }} clean check -x test"- !Todoid: create_stable_branch- title: Create a new stable branch, off from master+ title: Create a new stable branch, off from maindescription: In our case we'll create {{ stable_branch }}types:- major@@ -420,7 +420,7 @@ groups:commands_text: Run these commands to create a stable branchcommands:- !Command- cmd: git checkout master+ cmd: git checkout maintee: true- !Commandcmd: git pull --ff-only@@ -467,7 +467,7 @@ groups:tee: true- !Todoid: add_version_major- title: Add a new major version on master branch+ title: Add a new major version on main branchtypes:- majordepends: clean_git_checkout@@ -475,10 +475,10 @@ groups:next_version: "{{ release_version_major + 1 }}.0.0"commands: !Commandsroot_folder: '{{ git_checkout_folder }}'- commands_text: Run these commands to add the new major version {{ next_version }} to the master branch+ commands_text: Run these commands to add the new major version {{ next_version }} to the main branchcommands:- !Command- cmd: git checkout master+ cmd: git checkout maintee: true- !Commandcmd: python3 -u dev-tools/scripts/addVersion.py {{ next_version }}@@ -632,7 +632,7 @@ groups:Go to the JIRA "Manage Versions" Administration pages and add the new version:{% if release_type == 'major' -%}- . Change name of version `master ({{ release_version_major }}.0)` into `{{ release_version_major }}.0`+ . Change name of version `main ({{ release_version_major }}.0)` into `{{ release_version_major }}.0`{%- endif %}. Create a new (unreleased) version `{{ get_next_version }}`@@ -972,7 +972,7 @@ groups:logfile: svn_rm_containing.logcomment: Clean up containing folder on the staging repotee: true- post_description: 'Note at this point you will see the Jenkins job "Lucene-Solr-SmokeRelease-master" begin to fail, until you run the "Generate Backcompat Indexes" '+ post_description: 'Note at this point you will see the Jenkins job "Lucene-Solr-SmokeRelease-main" begin to fail, until you run the "Generate Backcompat Indexes" '- !Todoid: stage_maventitle: Stage the maven artifacts for publishing@@ -1191,7 +1191,7 @@ groups:depends:- prepare_announce_solrdescription: |- Push the website changes to 'master' branch, and check the staging site.+ Push the website changes to 'main' branch, and check the staging site.You will get a chance to preview the diff of all changes before you push.If you need to do changes, do the changes (e.g. by re-running previous step 'Update rest of webpage')and commit your changes. Then re-run this step and push when everything is OK.@@ -1202,7 +1202,7 @@ groups:You have to exit the editor after review to continue.commands:- !Command- cmd: git checkout master && git status+ cmd: git checkout main && git statusstdout: true- !Commandcmd: git diff@@ -1241,7 +1241,7 @@ groups:cmd: git checkout production && git pull --ff-onlystdout: true- !Command- cmd: git merge master+ cmd: git merge mainstdout: true- !Commandcmd: git push origin@@ -1272,9 +1272,9 @@ groups:commands_text: Edit DOAP filescommands:- !Command- cmd: git checkout master && git pull --ff-only+ cmd: git checkout main && git pull --ff-onlystdout: true- comment: Goto master branch+ comment: Goto main branch- !Commandcmd: "{{ editor }} dev-tools/doap/lucene.rdf"comment: Edit Lucene DOAP, add version {{ release_version }}@@ -1291,16 +1291,16 @@ groups:cmd: git push originlogfile: push.logstdout: true- comment: Push the master branch+ comment: Push the main branch- !Commandcmd: "git checkout {{ stable_branch }} && git pull --ff-only"stdout: truecomment: Checkout the stable branch- !Command- cmd: "git cherry-pick master"+ cmd: "git cherry-pick main"logfile: commit.logstdout: true- comment: Cherrypick the DOAP changes from master onto the stable branch.+ comment: Cherrypick the DOAP changes from main onto the stable branch.- !Commandcmd: git show HEADstdout: true@@ -1410,24 +1410,24 @@ groups:commands: !Commandsroot_folder: '{{ git_checkout_folder }}'commands_text: |- Update versions on master and stable branch.+ Update versions on main and stable branch.You may have to hand-edit some files before commit, so go slowly :)confirm_each_command: truecommands:- !Command- cmd: git checkout master && git pull --ff-only && git clean -df && git checkout -- .- comment: Go to master branch- logfile: checkout-master.log+ cmd: git checkout main && git pull --ff-only && git clean -df && git checkout -- .+ comment: Go to main branch+ logfile: checkout-main.log- !Commandcmd: python3 -u dev-tools/scripts/addVersion.py {{ release_version }}- logfile: addversion-master.log+ logfile: addversion-main.log- !Commandcmd: git diff- logfile: diff-master.log+ logfile: diff-main.logtee: true- !Commandcmd: git add -u . && git commit -m "Add bugfix version {{ release_version }}" && git push- logfile: commit-master.log+ logfile: commit-main.log- !Commandcmd: git checkout {{ stable_branch }} && git pull --ff-only && git clean -df && git checkout -- .logfile: checkout-stable.log@@ -1468,9 +1468,9 @@ groups:tee: truecomment: Find version regexes- !Command- cmd: git checkout master && git pull --ff-only && git clean -df && git checkout -- .- comment: Go to master branch- logfile: checkout-master.log+ cmd: git checkout main && git pull --ff-only && git clean -df && git checkout -- .+ comment: Go to main branch+ logfile: checkout-main.log- !Commandcmd: "{{ editor }} solr/CHANGES.txt"comment: Edit Solr CHANGES, do necessary changes@@ -1481,7 +1481,7 @@ groups:stdout: true- !Commandcmd: git add -u . && git commit -m "Sync CHANGES for {{ release_version }}" && git push- logfile: commit-master.log+ logfile: commit-main.log- !Commandcmd: git checkout {{ stable_branch }} && git pull --ff-only && git clean -df && git checkout -- .comment: Go to stable branch@@ -1594,22 +1594,22 @@ groups:cmd: git commit -m "Add back-compat indices for {{ release_version }}" && git pushlogfile: commit.log- !Todo- id: backcompat_master+ id: backcompat_maintitle: Generate Backcompat Indexes for unstable branchdescription: |- Now generate back-compat for unstable (master) branch.+ Now generate back-compat for unstable (main) branch.Note that this time we do not specify `--no-cleanup` meaning the tmp folder will be deleteddepends:- increment_release_versionvars:temp_dir: "{{ [release_folder, 'backcompat'] | path_join }}"- version: "{{ set_java_home(master_version) }}"+ version: "{{ set_java_home(main_version) }}"commands: !Commandsroot_folder: '{{ git_checkout_folder }}'- commands_text: Run these commands to add back-compat indices to master+ commands_text: Run these commands to add back-compat indices to maincommands:- !Command- cmd: git checkout master && git pull --ff-only && git clean -df && git checkout -- .+ cmd: git checkout main && git pull --ff-only && git clean -df && git checkout -- .tee: truelogfile: checkout.log- !Command@@ -1627,7 +1627,7 @@ groups:post_description: |When doing a major version release, eg. 8.0.0, you might also need to reenable somebackward compatibility tests for corner cases. To find them, run grep -r assume- lucene/backward-codecs/, which should find tests that have been disabled on master+ lucene/backward-codecs/, which should find tests that have been disabled on mainbecause there was no released Lucene version to test against.{{ set_java_home(release_version) }}- !Tododiff --git a/dev-tools/scripts/scriptutil.py b/dev-tools/scripts/scriptutil.pyindex 04983c0ea98..97992e116f7 100644--- a/dev-tools/scripts/scriptutil.py+++ b/dev-tools/scripts/scriptutil.py@@ -124,7 +124,7 @@ def find_branch_type():else:raise Exception('git status missing branch name')- if branchName == b'master':+ if branchName == b'main':return BranchType.unstableif re.match(r'branch_(\d+)x', branchName.decode('UTF-8')):return BranchType.stable