Skip to content

Commit

Permalink
fix: add builignore .github/ in add_github_actions_*() - fix #56
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Oct 26, 2023
1 parent f280e36 commit e8e28de
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions R/add_github_actions_check.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ add_github_actions_check <- function(open = FALSE, overwrite = FALSE,
dir.create(file.path(path_proj(), ".github", "workflows"),
showWarnings = FALSE, recursive = TRUE)

add_to_buildignore(".github", quiet = FALSE)

invisible(
file.copy(system.file(file.path("templates", "R-CMD-check.yaml"),
package = "rcompendium"), path))
Expand Down
2 changes: 2 additions & 0 deletions R/add_github_actions_citation.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ add_github_actions_citation <- function(open = FALSE, overwrite = FALSE,
dir.create(file.path(path_proj(), ".github", "workflows"),
showWarnings = FALSE, recursive = TRUE)

add_to_buildignore(".github", quiet = FALSE)

invisible(
file.copy(system.file(file.path("templates", "update-citation-cff.yaml"),
package = "rcompendium"), path))
Expand Down
2 changes: 2 additions & 0 deletions R/add_github_actions_codecov.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ add_github_actions_codecov <- function(open = FALSE, overwrite = FALSE,
dir.create(file.path(path_proj(), ".github", "workflows"),
showWarnings = FALSE, recursive = TRUE)

add_to_buildignore(".github", quiet = FALSE)

invisible(
file.copy(system.file(file.path("templates", "test-coverage.yaml"),
package = "rcompendium"), path))
Expand Down
2 changes: 2 additions & 0 deletions R/add_github_actions_document.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ add_github_actions_document <- function(open = FALSE, overwrite = FALSE,
dir.create(file.path(path_proj(), ".github", "workflows"),
showWarnings = FALSE, recursive = TRUE)

add_to_buildignore(".github", quiet = FALSE)

invisible(
file.copy(system.file(file.path("templates", "document-package.yaml"),
package = "rcompendium"), path))
Expand Down
2 changes: 2 additions & 0 deletions R/add_github_actions_pkgdown.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ add_github_actions_pkgdown <- function(open = FALSE, overwrite = FALSE,
dir.create(file.path(path_proj(), ".github", "workflows"),
showWarnings = FALSE, recursive = TRUE)

add_to_buildignore(".github", quiet = FALSE)

invisible(
file.copy(system.file(file.path("templates", "pkgdown.yaml"),
package = "rcompendium"), path))
Expand Down
4 changes: 3 additions & 1 deletion R/add_github_actions_render.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,14 @@ add_github_actions_render <- function(open = FALSE, overwrite = FALSE,
dir.create(file.path(path_proj(), ".github", "workflows"),
showWarnings = FALSE, recursive = TRUE)

add_to_buildignore(".github", quiet = FALSE)

invisible(
file.copy(system.file(file.path("templates", "render-README.yaml"),
package = "rcompendium"), path))


if (!quiet)
if (!quiet)
ui_done("Writing {ui_value('.github/workflows/render-README.yaml')} file")

if (open) edit_file(path)
Expand Down
5 changes: 0 additions & 5 deletions R/new_compendium.R
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,6 @@ new_compendium <- function(compendium = NULL, license = "GPL (>= 2)",
ui_title("Configuring GH Actions - R CMD CHECK")

add_github_actions_check(quiet = quiet)
add_to_buildignore(".github", quiet = quiet)
}


Expand All @@ -674,7 +673,6 @@ new_compendium <- function(compendium = NULL, license = "GPL (>= 2)",
ui_title("Configuring GH Actions - Code Coverage")

add_github_actions_codecov(quiet = quiet)
add_to_buildignore(".github", quiet = quiet)
}


Expand All @@ -690,7 +688,6 @@ new_compendium <- function(compendium = NULL, license = "GPL (>= 2)",
ui_title("Configuring GH Actions - Render README")

add_github_actions_render(quiet = quiet)
add_to_buildignore(".github", quiet = quiet)
}


Expand All @@ -706,7 +703,6 @@ new_compendium <- function(compendium = NULL, license = "GPL (>= 2)",
ui_title("Configuring GH Actions - Website deployment")

add_github_actions_pkgdown()
add_to_buildignore(".github", quiet = quiet)

ui_line()

Expand All @@ -726,7 +722,6 @@ new_compendium <- function(compendium = NULL, license = "GPL (>= 2)",
ui_title("Configuring GH Actions - CITATION.cff")

add_github_actions_citation(quiet = quiet)
add_to_buildignore(".github", quiet = quiet)
}


Expand Down
5 changes: 0 additions & 5 deletions R/new_package.R
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,6 @@ new_package <- function(license = "GPL (>= 2)", status = NULL,
ui_title("Configuring GH Actions - R CMD CHECK")

add_github_actions_check(quiet = quiet)
add_to_buildignore(".github", quiet = quiet)
}


Expand All @@ -722,7 +721,6 @@ new_package <- function(license = "GPL (>= 2)", status = NULL,
ui_title("Configuring GH Actions - Code Coverage")

add_github_actions_codecov(quiet = quiet)
add_to_buildignore(".github", quiet = quiet)
}


Expand All @@ -738,7 +736,6 @@ new_package <- function(license = "GPL (>= 2)", status = NULL,
ui_title("Configuring GH Actions - Render README")

add_github_actions_render(quiet = quiet)
add_to_buildignore(".github", quiet = quiet)
}


Expand All @@ -754,7 +751,6 @@ new_package <- function(license = "GPL (>= 2)", status = NULL,
ui_title("Configuring GH Actions - Website deployment")

add_github_actions_pkgdown()
add_to_buildignore(".github", quiet = quiet)

ui_line()

Expand All @@ -774,7 +770,6 @@ new_package <- function(license = "GPL (>= 2)", status = NULL,
ui_title("Configuring GH Actions - CITATION.cff")

add_github_actions_citation(quiet = quiet)
add_to_buildignore(".github", quiet = quiet)
}


Expand Down

0 comments on commit e8e28de

Please sign in to comment.