Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change regex to find fonts #268

Merged
merged 4 commits into from
Jan 20, 2021
Merged

change regex to find fonts #268

merged 4 commits into from
Jan 20, 2021

Conversation

cderv
Copy link
Contributor

@cderv cderv commented Jan 18, 2021

This will fix #267 by using a more generic regex, and adding one extension.

The issue in rstudio/rticles#362 (review) should also be fixed now.

I open the PR so that you check the regex in case I missed some edge case.

I added some tests for the CI so that we are sure a font is found in the database. But the rticle CI is also a way to test that for some formats

@cderv cderv mentioned this pull request Jan 18, 2021
11 tasks
@cderv cderv requested a review from yihui January 18, 2021 18:34
Copy link
Member

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! You can add a NEWS item and merge by yourself. Thanks!

@cderv
Copy link
Contributor Author

cderv commented Jan 20, 2021

But where is the NEWS file ?

I don't see any NEWS.md and only a inst/NEWS.Rd that points to Github Release. 🤔

What did I miss ?

@yihui
Copy link
Member

yihui commented Jan 20, 2021

Oh, never mind! I don't have a NEWS file for this repo...

@yihui yihui merged commit 1fd3334 into master Jan 20, 2021
@yihui yihui deleted the font-detect-install branch January 20, 2021 16:31
@cderv
Copy link
Contributor Author

cderv commented Jan 20, 2021

I was surprised to not find one. If you want one, I can add one including all the past release not 😉

res <- gh::gh("/repos/:owner/:repo/releases", owner = "yihui", repo = "tinytex")
library(purrr)
str(res, 1)

build_news_version <- function(name, body) {
  glue::glue("
             # {name}
             
             {body}
             
             ")
}

res %>%
  map(~ build_news_version(.x$name, .x$body)) %>%
  glue::glue_collapse(sep ="\n") %>%
  xfun::split_lines() %>%
  stringr::str_remove(pattern = "[\r]") %>%
  xfun::write_utf8("NEWS.md")

@yihui
Copy link
Member

yihui commented Jan 20, 2021

This repo often doesn't have a lot of changes in each release, which is why I didn't keep a news file but manually wrote the release notes directly in Github releases each time. Thanks anyway!

@cderv
Copy link
Contributor Author

cderv commented Jan 20, 2021

Oh as it was simple, I already created and pushed it 😅
33cbe60

Feel free to remove if you prefer to only update the release note !

I can also setup a workflow to generate (update) the NEWS each time you publish a new release 😃

@cderv
Copy link
Contributor Author

cderv commented Jan 20, 2021

Anyway it took me less than 10min. so do as you wish

@yihui
Copy link
Member

yihui commented Jan 20, 2021

Okay. I'll remove it for now, so I only need to maintain the release notes in one place. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve fonts auto installation
2 participants