regro / rever

Releaser of Versions
https://regro.github.io/rever-docs/
BSD 3-Clause "New" or "Revised" License
75 stars 33 forks source link

Pre release pipeline #197

Open CJ-Wright opened 5 years ago

CJ-Wright commented 5 years ago

It would be great to have a command/flag/something that would run a set of pre release activities. For instance, before running the release run black, the tests, and try to build the docs. This would provide a single source for pre release things. I think this would be particularly useful for latex projects, where one would like to render the project without releasing it, while rendering the project would be an important part of the release as well.

scopatz commented 5 years ago

Yep, we have this already, actually. I guess this is severely underdocumented, but what you do is set a separate environment variable as $ACTIVITIES_<entrypoint> = [...] a list of that prerelease activities. e.g.

rever.xsh

$ACTIVITIES_PRE = ['pytest']

Then at the command line, you provide the -e entrypoint flag to run those activities. So for example, you could run:

$ rever -e pre 1.2.3

This is an alternative to writing a separate rever-pre.xsh file, and passing that in with the --rc flag.