How to create a distribution of kealib. 

1.  Ensure that you have fetched and committed everything which needs to go in.

2.  Update the LIBKEA_VERSION_MAJOR, LIBKEA_VERSION_MINOR, LIBKEA_VERSION_PATCH
    fields in CMakeLists.txt. Version number is of the form MAJOR.MINOR.PATCH, 
    as discussed below. 
    And setup.py.
    
3.  Ensure the Python bindings are installed and run gen_python_docs.sh
    to update docs/python.
   
4.  Close any inactive branches.

5.  Update Changes.txt, by going through the 
    change logs since the last release, and noting what has been done. 
    DON'T FORGET TO COMMIT AND PUSH THIS, BEFORE THE NEXT STEP!!!!

6.  clone repo into /tmp so similar and cd into it
   
7.  Export an environment variable with the version to make the following commands
    easier UPDATE AS NEEDED:
    
        export KEAVER=1.5.3
    
8.  Use "git tag" to add a version number tag, e.g.

        git tag -a kealib-${KEAVER} -m "Tag version $KEAVER"
    
9.  Push changes AND tag to github:

        git push
        git push origin --tags

10. Create .zip and .tar.gz using the 'git archive' command and the tag
    created in the previous step:
    
        git archive --format tar.gz --prefix=kealib-${KEAVER}/ -o kealib-${KEAVER}.tar.gz kealib-${KEAVER}
        git archive --format zip --prefix=kealib-${KEAVER}/ -o kealib-${KEAVER}.zip kealib-${KEAVER}

11.  Create .sha56 files for both the .tar.gz and the .zip:

        sha256sum kealib-${KEAVER}.tar.gz > kealib-${KEAVER}.tar.gz.sha256
        sha256sum kealib-${KEAVER}.zip > kealib-${KEAVER}.zip.sha256
    
12. Go to https://github.com/ubarsc/kealib/releases and click on the release
    for the tag just created. Click "Edit".
       Tag version: kealib-A.B.C
       Release Title: Version A.B.C
       Upload files: Add the tar.gz and zip files, and their sha256 checksum files. 
       Also any Arc/Imagine installers for this version.
       Click "Publish release"
 
13. Update the kealib to the latest version on conda-forge by creating a PR at 
    https://github.com/conda-forge/kealib-feedstock (NOTE: this should now happen
    automatically). Also update the pinning if required - see 
    https://github.com/conda-forge/conda-forge-pinning-feedstock/
    
14. Let the Spack guys know there is a new release.

Version Numbers.
The kealib version number is structured as MAJOR.MINOR.PATCH
- The MAJOR number should change for major alterations, most particularly those 
  which break backward compatability, or which involve major restructuring of 
  code or data structures. 
- The MINOR number should change for introduction of significant new features
  Note: this includes adding new data members on C++ classes as this breaks 
  ABI compatibility.
- The PATCH number should change for bug fixes or very minor changes. There should
  be no change to the ABI for these releases.
