kriskowal/q — pull request #368 by kriskowal (2013-08-21 00:35:56+00:00)
Title: Compute S3 release name

@domenic, This patch applies to the `from-commonjs` branch. I mark this because it is irregular to send a pull request to a pull request. Especially with incomplete functionality.

I am not sure how to bridge the gap between this and S3, but the premise is to have Travis publish to S3 in a subdirectory based on the version. To do this, I’m reaching into `package.json` to get the version number. This is an official release if there is a tag in Git for the same version *and* that tag has the same hash of the working copy *and* the working copy is clean. Without invoking a subprocess, I can’t verify that the working copy is clean, but that would presumably be the case on Travis. I reach into `.git` to verify the other factors. If the criteria are not satisfied, we publish the release to a directory based on the Git hash. If this is not in Git, we call it `default` and pray that never happens.

So, now we have a `releaseName` variable in the Gruntfile. Further work needed to add the release name to the directory published to S3. Once that is in place, the `volo` config can have `{version}` in it.