girder/girder — pull request #377 by jbeezley (2014-10-05 22:23:26+00:00)
Title: Build git SHA into source/derive version from package.json

One side effect of this change is that `grunt` must be run before `python setup.py install`. This will create the `girder/girder-version.json` file that is read by `girder/constants.py`. I added this file to the setuptools manifest so that it will be included when deployed onto PyPI. I made this change in the various testing scripts in the repository, but to my knowledge this step isn't actually doing anything because the girder package in the current directory is always superseding the installed version anyway.

Everywhere (except in the client test) there are fallbacks in case the source is not inside a git repository. For example, one can download the tarball from github and the build will still work. In this case, the build date is placed onto the front page and returned by the rest api.

I also made some changes so that the api version everywhere in the code is derived from the version number in `package.json`. I am assuming the client and api version numbers are the same at the moment, but we can add a key like `girder-api-version` to `package.json` to differentiate them in the future.