regro / rever

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

Best way to get parts of rever.xsh from other places #135

Open CJ-Wright opened 6 years ago

CJ-Wright commented 6 years ago

There is some boilerplate rever.xsh things that I use for the XPD stack. What would be the best way to centralize that boilerplate so I don't need to keep writing it? (I imagine some other places would like this as well, eg. conda-forge)

scopatz commented 6 years ago

You can always import a module (.py or .xsh), call a function, etc. If there are common patterns that you are seeing, maybe we could put them in rever or you could always create your own package that your rever.xsh happens to depend on.

CJ-Wright commented 6 years ago

It's mostly just the github org, the changelog prepend things.

scopatz commented 6 years ago

ie everything is the same except the github org?

CJ-Wright commented 6 years ago

The org is the same the project name isn't.

scopatz commented 6 years ago

but then everything else is the same?

CJ-Wright commented 6 years ago

https://github.com/xpdAcq/xpdAcq/blob/master/rever.xsh vs. https://github.com/xpdAcq/xpdAn/blob/master/rever.xsh

There are some other differences but I could use templating to reduce those changes.

scopatz commented 6 years ago

I would write a function that takes the repo / project name and then sets all of the env vars, rather than templating.

CJ-Wright commented 6 years ago

That's fair. I can put that function in some central repo which everything depends on.

scopatz commented 6 years ago

I mean, you could ever through it in a repo and then have rever.xsh download it and then import/source it :smiley:

CJ-Wright commented 6 years ago

I was thinking about using exec :)

scopatz commented 6 years ago

Either way!