deis/deis — pull request #1581 by bacongobbler (2014-08-13 20:40:50+00:00)
Title: fix(builder): check if a build is running

To ensure backwards compatibility, some apps on creation do not have
the respective directory in etcd set before a build. Because of that,
the build directory would be deleted in the middle of a build.

With the proposed fix, the directory will not be deleted if there is
a build running. because of how gitreceive works, the repository is
built on a push, making it possible to build, delete, then build again.
The downside to this is the loss of being able to cache Dockerfile
builds, but that's already an issue as noted in #1334.

closes #1438

@aledbf, could you please verify that this works for you?