update version.qmd
This commit is contained in:
+8
-7
@@ -14,17 +14,18 @@ tibble::tibble(branch = system("git branch -a", intern = TRUE)) |>
|
||||
dplyr::filter(grepl("remotes", branch)) |>
|
||||
dplyr::filter(!grepl("HEAD", branch)) |>
|
||||
dplyr::mutate(branch = gsub("^.*\\/", "", branch)) |>
|
||||
dplyr::arrange(desc(branch)) |>
|
||||
dplyr::mutate(
|
||||
htmlstr = paste0(
|
||||
"## [**Version**: ",
|
||||
branch,
|
||||
"](https://drc.drwater.net/{{< var projtype >}}/{{< var pubtype >}}/{{< var reponame >}}/",
|
||||
branch,
|
||||
"/)<br><br>"
|
||||
"/)"
|
||||
)
|
||||
) |>
|
||||
dplyr::pull(htmlstr) |>
|
||||
paste(collapse = "") |>
|
||||
paste(collapse = "\n\n") |>
|
||||
cat()
|
||||
```
|
||||
|
||||
@@ -38,8 +39,9 @@ tibble::tibble(branch = system("git branch -a", intern = TRUE)) |>
|
||||
branches <- system("git branch -r", intern = TRUE)
|
||||
branches <- trimws(branches) # 去除空白字符
|
||||
branches <- branches[!grepl("HEAD", branches)]
|
||||
|
||||
all_commits <- list()
|
||||
branches <- tibble::tibble(branch = branches) |>
|
||||
dplyr::arrange(dplyr::desc(branch)) |>
|
||||
dplyr::pull(branch)
|
||||
|
||||
cat("\n")
|
||||
for (branch in branches) {
|
||||
@@ -53,10 +55,9 @@ for (branch in branches) {
|
||||
),
|
||||
intern = TRUE
|
||||
)
|
||||
all_commits[[branch]] <- paste0("- ", commits)
|
||||
cat("\n")
|
||||
# all_commits[[branch]] <- paste0("- ", commits)
|
||||
cat(paste0("- ", commits), sep = "\n")
|
||||
cat("\n\n")
|
||||
cat("\n")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user