Nothing
context("version increment - DESCRIPTION/README badge")
skip_on_cran()
skip_on_appveyor()
skip_on_travis()
return_code <- system("git diff", intern = TRUE)
# only if there are diffs this check should be made
# i.e. users of the package should not be confronted
# with this test
if (length(return_code) == 0) {
skip("No diffs in git.")
}
grep_version <- grep("Version: \\d\\.\\d\\.\\d", return_code)
grep_badge <- grep("https://img.shields.io/badge/", return_code)
# should return length 2 if the Version number has changed
# this will only check if the developer locally runs the tests
# travis will skip this
test_that("Version number has been incremented in DESCRIPTION", {
expect_true(length(grep_version) >= 2)
})
test_that("Version number has been incremented in README badge", {
expect_true(length(grep_badge) >= 2)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.