regro / rever

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

Version being set to x.y.z #15

Closed asmeurer closed 7 years ago

asmeurer commented 7 years ago

I am using $VERSION and it is is being set to x.y.z instead of the version I am passing in.

asmeurer commented 7 years ago

FYI this is a major blocker for me right now.

asmeurer commented 7 years ago

I think it is only being defined inside an @activity. So I have to do some stupid workarounds to make it defined at the module level.

scopatz commented 7 years ago

Under what circumstances are you seeing this? Is there a way to reproduce.

If you are using the CLI, the argparser requires that version be set on the command line and then it very quicly sets $VERSION (see here)

x.y.z is the default env var value (see here) but you should never see this once environ.context() is entered... i.e. in env_main()

asmeurer commented 7 years ago

It seems to happen when I use $VERSION outside of an @activity. I need to define it at the module level so that I can access it in some helper functions.

scopatz commented 7 years ago

outside of an activity in rever.xsh? Or in a test file? or where exactly? Sorry I am not seeing it :(

asmeurer commented 7 years ago

In rever.xsh. I tried setting

version = $VERSION

at the module level of the file, and it gets set to x.y.z.

scopatz commented 7 years ago

That is definitely a bug =/

scopatz commented 7 years ago

OK I have a test that reproduces this bug.

scopatz commented 7 years ago

See #23