Skip to content

Commit

Permalink
inline version_aligned()
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Mar 6, 2024
1 parent 3655a8d commit a557439
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions R/record_versions.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ record_versions <- function(
previous <- read_versions_previous(manifest = manifest)
new <- update_version_manifest(current = current, previous = previous)
jsonlite::write_json(x = new, path = manifest, pretty = TRUE)
aligned <- versions_aligned(manifest = new)
aligned <- (new$version_current == new$version_highest) &
(new$hash_current == new$hash_highest)
new_issues <- new[!aligned,, drop = FALSE] # nolint
jsonlite::write_json(x = new_issues, path = issues, pretty = TRUE)
invisible()
Expand Down Expand Up @@ -95,8 +96,3 @@ manifest_compare_versions <- function(manifest) {
}
)
}

versions_aligned <- function(manifest) {
(manifest$version_current == manifest$version_highest) &
(manifest$hash_current == manifest$hash_highest)
}

0 comments on commit a557439

Please sign in to comment.