fledge icon indicating copy to clipboard operation
fledge copied to clipboard

Allow tag version to use a template

Open gadenbuie opened this issue 2 years ago • 6 comments

I've recently been working in a repo where an R and Python package live in subfolders and need to co-exist. They're versioned independently since they aren't parallel implementations, so I'd like to be able to use r{version} for the tag rather than the current v{version}.

https://github.com/cynkra/fledge/blob/943ac4dddcfd80b0d637a13c83e7fb96283a9488/R/tag-version.R#L47

In my use case it'd be helpful if I could provide a glue or sprintf string that would be passed down to tag_version.

gadenbuie avatar Feb 09 '23 20:02 gadenbuie

The setup described also reminds me of #9, because of that issue I'm a bit surprised using fledge works at all in a monorepo.

maelle avatar Feb 16 '23 13:02 maelle

The setup described also reminds me of #9, because of that issue I'm a bit surprised using fledge works at all in a monorepo.

Oh yeah good point. Right now development isn't overlapping so it hasn't been an issue yet. Also since we'd be using fledge in only one place (the R package) I think we'll escape trouble?

gadenbuie avatar Feb 16 '23 13:02 gadenbuie

AFAIU there are two problems with packages in a subfolder

  • fledge can only find NEWS.md at the root currently;
  • fledge uses all commits.

maelle avatar Feb 20 '23 11:02 maelle

The feature described in this issue could be configuration or an argument to the functions that create releases.

maelle avatar Feb 20 '23 11:02 maelle

Just thinking out loud, but it seems like you could cover a lot of edge-case fledge uses by making it possible to

  1. filter news-worthy commits by changes to files within a directory
  2. point to a specific NEWS.md file to be updated

You could construct the defaults so that most people wouldn't have to modify them:

  1. If not provided, use the first NEWS.md found in the current or ancestor directories up to the root directory
  2. Default to commits modifying files within or under the location of NEWS.md.

gadenbuie avatar Feb 22 '23 02:02 gadenbuie

  1. will need https://github.com/r-lib/gert/issues/2 :smile_cat: (at least it'd be easier if that existed)

maelle avatar Feb 27 '23 11:02 maelle