scottohara/tvmanager — Issue #28: Get version number from env var, auto-bump on tag
Author: scottohara
Created: 2011-12-12 05:54:56+00:00
State: open
Labels: Improvement

Currently the version number displayed in the settings => about page is sourced from the file appConfig.json

This means that the version number needs to be manually bumped any time a change is made.

What would be nice would be to source the version number from an environment variable (the same way that the database name is sourced); and have that environment variable automatically updated/set based on a git tag.

The ideal workflow would be something like this:

# After developing/testing/merging a feature back into master, create a tag (eg. `git tag -a "Version 1.00" v1.00`)
# Push the changes & tag to GitHub (eg. `git push && git push --tags`)
# Push the tag to the staging remote on Heroku (eg. `git push staging v1.00`)
# A post-receive hook on Heroku (somehow?) looks at the tag that was push, and updates the config var (eg. `heroku config:add APP_VERSION=v1.00`)

Arguably, rather than a post-receive hook on the remote side (which is unlikely to occur), we could have a rake task that encapsulates these steps.

In dev, happy for the version number to be "dev" or "head" or "master" (doesn't have to be the most recent tag).