collorg/halfORM_packager

Add release command to hop

Opened this issue · 3 comments

When a patch is ready, the hop releasecommand shoud:

  • rebase the hop_X.Y.Z git branch on hop_main
  • change the version to X.Y.Z
  • git commit -m "[release] X.Y.Z" + "\n" + Patches/X/Y/Z/Changelog.md
  • tag hop_main with `git tag -a X.Y.Z -m "release X.Y.Z"

Currently, the version is specified in the setup.py file. It should be in a version.txt file which would be updated by hop release.

For the version, version.txt is not the solution suggested by PyPa.

See:

https://packaging.python.org/guides/single-sourcing-package-version/

For the version, version.txt is not the solution suggested by PyPa.

Ok. version.txt should be VERSION.

Place the value in a simple VERSION text file and have both setup.py and the project code read it.

with open(os.path.join(mypackage_root_dir, 'VERSION')) as version_file:
    version = version_file.read().strip()

An advantage with this technique is that it’s not specific to Python. Any tool can read the version.

Warning

With this approach you must make sure that the VERSION file is included in all your source and binary distributions (e.g. add include VERSION to your MANIFEST.in). 

We should also include the empty database of the current release in "Releases".