jbweston / miniver

Like Versioneer, but smaller
Creative Commons Zero v1.0 Universal
53 stars 10 forks source link

Adds ver command option to return generated version #29

Closed chinghwayu closed 3 years ago

chinghwayu commented 3 years ago

Feel free to change the command from ver to something else.

$ miniver
usage: miniver [-h] [-v] {install,ver} ...

Interact with miniver

positional arguments:
  {install,ver}
    install      Install miniver into the current Python package
    ver          Get generated version

optional arguments:
  -h, --help     show this help message and exit
  -v, --version  show program's version number and exit
$ miniver ver .
0.8.0-dev2+g133c339
chinghwayu commented 3 years ago

I think it would also be good to add tests to .github/workflows/test.yml. They can be essentially the same as the existing tests, except that we would invoke miniver ver directly rather than calling the Python interpreter.

Writing tests seem easy enough but I don't really work with Github actions and don't have an environment setup to run act.

I'll leave this to you...