Page MenuHomePhabricator

Allow "Lease Working Copy" to just provide an empty folder
Closed, WontfixPublic

Description

I swear there's a task for this already, but searching in Maniphest or Application Search here doesn't yield anything useful.

So I have a project which does the following:

  • Build the code
  • Copy the resulting binary to a bunch of other repositories

The build the code plan is pretty straight-forward, but for "Copy the resulting binary to a bunch of other repositories", what I do is:

  • rm -Rf * (this removes everything but the .git folder so that the working copy doesn't break)
  • git clone http://someurl/ repo
  • cd repo && someothercommand1
  • cd repo && someothercommand2
  • etc. etc.

The issue is when "Build the code" goes to re-use this working copy. Because "Build the code" doesn't do "rm -Rf *" (it has no need to), it means that the repo folder gets left behind and this breaks the build process. For example, the error I get during "Build the code" is:

	/srv/leases/workingcopy-25083/repo/protobuild/Protobuild/Protobuild.Linux.csproj: error : Command 'mono "/srv/leases/workingcopy-25083/repo/protobuild//repo/Protoinject/Linux/Protoinject.FactoryGenerator/AnyCPU/Protoinject.FactoryGenerator.exe" "obj/Linux/AnyCPU/Release/Protobuild.exe" "/usr/lib/mono/4.5/System.dll;/usr/lib/mono/4.5/System.Core.dll;/usr/lib/mono/4.5/mscorlib.dll"' exited with code: 1.
3617

which is caused by that repo folder being there.

I think this is a side effect of the fact that I really just want an empty directory to do my build in, without a working copy cloned out. The reason is that the build for "update the repos" happens against the buildable of the thing being built, rather than against a buildable of the target repository that's being updated.

Event Timeline

epriestley claimed this task.
epriestley added a subscriber: epriestley.

It doesn't make sense for "Lease Working Copy" to not provide a working copy.

Well my point is that I need some equivalent of "Lease Working Copy" that just provides an empty folder to work in.