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

feat: New init_release(), to be called before pre_release() #686

Merged
merged 18 commits into from
Oct 22, 2023

Conversation

krlmlr
Copy link
Contributor

@krlmlr krlmlr commented Jun 21, 2023

Decided to keep it closer to the current workflow. Added an init_release() that does part of what pre_release() is doing.

@maelle: Can you please, starting at the beginning, pick up the commits one by one and add tests, perhaps in new individual PRs? I'll keep managing this branch.

@krlmlr
Copy link
Contributor Author

krlmlr commented Jul 3, 2023

Editing the OP here to add everything that will be closed with this PR.

R/auto.R Outdated Show resolved Hide resolved
R/auto.R Outdated
# FIXME: Needs repair in create_release_branch()
stopifnot(!force)
init_release_impl <- function(which, force) {
# FIXME: Slightly different process for releasing from the non-main branch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

releasing from the non-main branch is undocumented, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work, eventually. Also, bumping on the non-main branch should eventually work (but never delete tags).

R/auto.R Outdated Show resolved Hide resolved
R/auto.R Outdated Show resolved Hide resolved
R/auto.R Outdated Show resolved Hide resolved
R/auto.R Outdated
branch_name <- paste0("cran-", desc::desc_get_version())
merge_dev_news <- function(fledgeling, new_version) {
dev_idx <- grepl("^[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+$", fledgeling$news$version)
stopifnot(dev_idx[[1]])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why? add comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, we would be counting the wrong thing in the rle() call below. A comment would be great indeed, or perhaps extract a function?

R/auto.R Outdated Show resolved Hide resolved
R/auto.R Outdated Show resolved Hide resolved
R/bump-version.R Outdated
@@ -33,7 +34,7 @@ bump_version_impl <- function(which,
#' 1. Depending on the `which` argument:
if (which == "dev") {
#' - If `"dev"`, [finalize_version()] with `push = FALSE`
finalize_version_impl(push = FALSE)
finalize_version_impl(push = FALSE, suggest_finalize = edit)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this argument name unclear. edit is clearer. could we rename suggest_finalize to edit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the argument name make more sense in the context of finalize_version_impl() ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would still find "edit" clearer

R/commit-version.R Outdated Show resolved Hide resolved
@krlmlr krlmlr force-pushed the f-658-init-release branch 6 times, most recently from ae25da6 to 9d336e5 Compare July 10, 2023 07:31
R/auto.R Show resolved Hide resolved
@maelle
Copy link
Member

maelle commented Jul 10, 2023

I tried adding cached responses for pre_release() but I am getting an SSL error, I think still because of https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/, some setup I'm doing wrong. 🤔 I can use usethis::use_github() interactively.

@maelle
Copy link
Member

maelle commented Jul 10, 2023

progress! https://github.com/maelle/tea/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc next time I'll look into why the responses aren't cached but at least I am able to create the toy repo 😁

@krlmlr
Copy link
Contributor Author

krlmlr commented Jul 10, 2023

The checks for the last commit asks for a GITHUB_PAT variable, but I'd rather use mocking here too.

@krlmlr
Copy link
Contributor Author

krlmlr commented Jul 12, 2023

I now also think that bumping the version with the special message should move to pre_release() . Will take it on for the next package I release.

@krlmlr
Copy link
Contributor Author

krlmlr commented Jul 12, 2023

The list of user action items after fledge::pre_release() is incomplete, should point to the PR at least.

@krlmlr
Copy link
Contributor Author

krlmlr commented Jul 12, 2023

fledge:::upload_cran() is broken 🙀 🙀 🙀

@maelle
Copy link
Member

maelle commented Jul 13, 2023

Some notes on mocking:

@maelle
Copy link
Member

maelle commented Jul 13, 2023

I now also think that bumping the version with the special message should move to pre_release() . Will take it on for the next package I release.

Is a change here needed?

@krlmlr krlmlr force-pushed the f-658-init-release branch 6 times, most recently from a31c447 to 584222f Compare October 22, 2023 05:12
@krlmlr krlmlr changed the title feat: Split pre_release() feat: New init_release(), to be called before pre_release() Oct 22, 2023
@krlmlr krlmlr merged commit 3af6c0d into main Oct 22, 2023
17 checks passed
@krlmlr krlmlr deleted the f-658-init-release branch October 22, 2023 17:04
@krlmlr
Copy link
Contributor Author

krlmlr commented Oct 22, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment