Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Snapshot updates for rcc-smoke (null) #752

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 4 additions & 21 deletions R/auto.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"`.
Expand Down Expand Up @@ -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
}
Expand Down
74 changes: 0 additions & 74 deletions tests/testthat/_snaps/auto.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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.