self.target is an existing Git checkout at /mnt/nfs/shared/{project_code}
prebuilt assets are unpacked into a given directory in self.target (the exact directory is encoded in the archive, so self.target is exactly the git checkout).
Now, using SingleUntar isn't convergent in this case because it tries to unpack the assets on each deploy: this is because the mtime of self.target isn't affected by the unpack since the files are unpacked into a directory inside self.target.
The self.touch solves the issue by updating the mtime of the target.
This is not expected to affect the "traditional" use-case of SingleUntar where a new unpack creates a new directory called self.target.
Consider the following use-case:
self.target
is an existing Git checkout at/mnt/nfs/shared/{project_code}
self.target
(the exact directory is encoded in the archive, soself.target
is exactly the git checkout).Now, using
SingleUntar
isn't convergent in this case because it tries to unpack the assets on each deploy: this is because the mtime ofself.target
isn't affected by the unpack since the files are unpacked into a directory insideself.target
.The
self.touch
solves the issue by updating the mtime of the target.This is not expected to affect the "traditional" use-case of
SingleUntar
where a new unpack creates a new directory calledself.target
.