From 8acc785cf152bcf4b91992cdf3f775623ec8753f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sat, 4 Nov 2023 09:47:10 +0100 Subject: [PATCH 1/2] feat: `post_release()` no longer checks if on release branch . --- R/auto.R | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/R/auto.R b/R/auto.R index 15f08fb71..2e4f52b8e 100644 --- a/R/auto.R +++ b/R/auto.R @@ -18,8 +18,8 @@ #' @param which Component of the version number to update. Supported #' values are #' * `"next"` (`"major"` if the current version is `x.99.99.9yz`, -#' `"minor"` if the current version is `x.y.99.za`, -#' `"patch"` otherwise), +#' `"minor"` if the current version is `x.y.99.za`, +#' `"patch"` otherwise), #' * `"patch"` #' * `"minor"`, #' * `"major"`. @@ -472,31 +472,14 @@ post_release <- function() { post_release_impl <- function() { check_only_modified(c(".Rbuildignore")) - - check_post_release() + # Need PAT for creating GitHub release + check_gh_pat("repo") # Begin extension points # End extension points create_github_release() - merge_main_into_post_release() - - # FIXME: Check if PR open, if yes merge PR instead - release_branch <- get_branch_name() - switch_branch(get_main_branch()) - pull_head() - merge_branch(release_branch) - - bump_version_impl( - read_fledgling(), - "dev", - no_change_behavior = "bump", - edit = FALSE, - no_change_message = "- Resume development after CRAN release." - ) - push_head() - # Begin extension points # End extension points } From 04ce4146dc6ebfe11b8d9f6435ff177b30b451df Mon Sep 17 00:00:00 2001 From: krlmlr Date: Sat, 4 Nov 2023 08:50:52 +0000 Subject: [PATCH 2/2] [create-pull-request] automated change --- tests/testthat/_snaps/auto.md | 74 ----------------------------------- 1 file changed, 74 deletions(-) diff --git a/tests/testthat/_snaps/auto.md b/tests/testthat/_snaps/auto.md index 012a81b72..a0fca2306 100644 --- a/tests/testthat/_snaps/auto.md +++ b/tests/testthat/_snaps/auto.md @@ -187,31 +187,8 @@ Code post_release() Message - > Checking presence and scope of `GITHUB_PAT`. > Creating GitHub release "v0.0.1". > Omitting in test. - > Switching to branch main. - > Pulling main. - Resetting main to origin/main - > Merging release branch. - i If this fails, resolve the conflict manually and push. - > Digesting messages from 2 commits. - v Found 1 NEWS-worthy entry. - - -- Updating NEWS -- - - > Adding new entries to 'NEWS.md'. - - -- Updating Version -- - - v Package version bumped to 0.0.1.9000. - > Added header to 'NEWS.md'. - > Committing changes. - - -- Tagging Version -- - - > Creating tag v0.0.1.9000 with tag message derived from 'NEWS.md'. - > Pushing main. # full cycle pre-minor @@ -288,31 +265,8 @@ Code post_release() Message - > Checking presence and scope of `GITHUB_PAT`. > Creating GitHub release "v0.1.0". > Omitting in test. - > Switching to branch main. - > Pulling main. - Resetting main to origin/main - > Merging release branch. - i If this fails, resolve the conflict manually and push. - > Digesting messages from 2 commits. - v Found 1 NEWS-worthy entry. - - -- Updating NEWS -- - - > Adding new entries to 'NEWS.md'. - - -- Updating Version -- - - v Package version bumped to 0.1.0.9000. - > Added header to 'NEWS.md'. - > Committing changes. - - -- Tagging Version -- - - > Creating tag v0.1.0.9000 with tag message derived from 'NEWS.md'. - > Pushing main. # release abandon @@ -390,26 +344,6 @@ Not submitting for real o:-) Not submitting for real o:-) ---- - - Code - post_release() - Condition - Error in `check_post_release()`: - ! The main branch contains newsworthy commits. - i Run `fledge::bump_version()` on the main branch. - ---- - - Code - post_release() - Message - > Omitting in test. - Condition - Error in `merge_main_into_post_release()`: - ! Merging the main branch into the release branch failed. - i Resolve the conflict manually and push. - # full cycle, add more to main NO PUSH Code @@ -432,11 +366,3 @@ Not submitting for real o:-) Not submitting for real o:-) ---- - - Code - post_release() - Condition - Error in `check_post_release()`: - ! Local main branch ahead by 1 commit. -