Skip to content

Commit cefd16a

Browse files
Clarify choose_version() prompt for use_release_issue() (#1359)
1 parent 762daec commit cefd16a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

R/release.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use_release_issue <- function(version = NULL) {
2525
}
2626
}
2727

28-
version <- version %||% choose_version()
28+
version <- version %||% choose_version("What should the release version be?")
2929
if (is.null(version)) {
3030
return(invisible(FALSE))
3131
}

R/version.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use_version <- function(which = NULL) {
4242
msg = "There are uncommitted changes and you're about to bump version"
4343
)
4444

45-
new_ver <- choose_version(which)
45+
new_ver <- choose_version("What should the new version be?", which)
4646
if (is.null(new_ver)) {
4747
return(invisible(FALSE))
4848
}
@@ -75,7 +75,7 @@ use_dev_version <- function() {
7575
use_version(which = "dev")
7676
}
7777

78-
choose_version <- function(which = NULL) {
78+
choose_version <- function(message, which = NULL) {
7979
ver <- desc::desc_get_version(proj_get())
8080
versions <- bump_version(ver)
8181

@@ -85,7 +85,8 @@ choose_version <- function(which = NULL) {
8585
"{format(names(versions), justify = 'right')} --> {versions}"
8686
),
8787
title = glue(
88-
"Current version is {ver}.\n", "Which part to increment? (0 to exit)"
88+
"Current version is {ver}.\n",
89+
"{message} (0 to exit)"
8990
)
9091
)
9192
if (choice == 0) {

0 commit comments

Comments
 (0)