@@ -530,7 +530,63 @@ def update_conda_forge(
530530 _wait_for_done (message )
531531
532532 if is_release_candidate :
533- upstream_branch = "release-candidate"
533+ message = (
534+ "Visit the conda-forge feedstock branches page:\n "
535+ "https://github.com/conda-forge/iris-feedstock/branches"
536+ )
537+ _wait_for_done (message )
538+
539+ message = (
540+ "Find the release candidate branch - "
541+ "`rc`/`release-candidate`/similar.\n "
542+ )
543+ rc_branch = _get_input (
544+ message ,
545+ "Input the name of the release candidate branch"
546+ )
547+
548+ message = (
549+ f"Is the latest commit on { rc_branch } over 1 month ago?"
550+ )
551+ archive_rc = None
552+ while archive_rc is None :
553+ age_check = _get_input (message , "y / n" )
554+ if age_check .casefold () == "y" .casefold ():
555+ archive_rc = True
556+ elif age_check .casefold () == "n" .casefold ():
557+ archive_rc = False
558+ else :
559+ _report_problem ("Invalid entry. Please try again ..." )
560+
561+ if archive_rc :
562+ # We chose this odd handling of release candidate branches because
563+ # a persistent branch will gradually diverge as `main` receives
564+ # automatic and manual maintenance (where recreating these on
565+ # another branch is often beyond Iris dev expertise). Advised
566+ # practice from conda-forge is also liable to evolve over time.
567+ # Since there is no benefit to a continuous Git history on the
568+ # release candidate branch, the simplest way to keep it aligned
569+ # with best practice is to regularly create a fresh branch from
570+ # `main`.
571+
572+ date_string = datetime .today ().strftime ("%Y%m%d" )
573+ message = (
574+ f"Archive the { rc_branch } branch by appending _{ date_string } "
575+ "to its name.\n "
576+ f"e.g. rc_{ date_string } \n \n "
577+ f"({ __file__ } includes an explanation of this in the comments)."
578+ )
579+ _wait_for_done (message )
580+
581+ message = (
582+ "Follow the latest conda-forge guidance for creating a new "
583+ "release candidate branch from the `main` branch:\n "
584+ "https://conda-forge.org/docs/maintainer/knowledge_base.html#pre-release-builds\n \n "
585+ "Config file(s) should point to the `rc_iris` label.\n "
586+ )
587+ rc_branch = _get_input (message , "Input the name of your new branch" )
588+
589+ upstream_branch = rc_branch
534590 else :
535591 upstream_branch = "main"
536592
0 commit comments