playframework/playframework — pull request #2601 by jroper (2014-04-04 06:55:38+00:00)
Title: Added activator template test/publish

The templates themselves aren't yet finished, they still need things like activator.properties, and we need to incorporate this into the Play release process, but for now the important thing is to review the templates build script.

The output of this looks like this:

```
> publish-templates
[info] Preparing templates...
[info] Packaging templates...
[info] Uploading templates to S3...
[==================================================] 100% play-scala.zip
[==================================================] 100% play-java.zip
[info] Uploaded 2 files to the S3 bucket "downloads.typesafe.com".
[info] Publishing templates...
[error] Error publishing template play-scala.zip
[error] /tmp/sbt_1ae714aa/unpacked/activator.properties does not exist
[error] Error publishing template play-java.zip
[error] /tmp/sbt_f5d3f343/unpacked/activator.properties does not exist
[info] Cleaning up S3...
[info] Deleted 2 objects from the S3 bucket "downloads.typesafe.com".
[error] (*:publishTemplates) play.sbt.activator.Templates$TemplatePublishFailed
[error] Total time: 20 s, completed 04/04/2014 5:39:46 PM
```

So it parameterises the templates, zips them up, publishes to S3, pings typesafe.com to get it to publish them, and then polls typesafe.com for the results. Finally, regardless of whether it successfully publishes or not, it cleans up the artifacts published to S3.