- Jamis
On May 28, 2008, at 11:56 AM, Mirko wrote:
So I have tried deploying with the following settings: set :scm, :git set :deploy_via, :copy set :copy_cache, true set :copy_exclude, %w(.git) set :git_shallow_clone, 1 However, I am getting the following error message during the deploy: * refreshing local cache to revision f0ab3b2a0e4d99c0ea6720fae2df5fb853135bee at /var/folders/ 38/38oRkH3gEFKzHxrW7VoXJE+++TI/-Tmp-/repository executing locally: cd /var/folders/38/38oRkH3gEFKzHxrW7VoXJE+++TI/- Tmp-/repository && git fetch --tags origin && git reset --hard f0ab3b2a0e4d99c0ea6720fae2df5fb853135bee fatal: Could not parse object 'f0ab3b2a0e4d99c0ea6720fae2df5fb853135bee'. If I comment out the copy_cache setting, everything works fine (although I suppose the copy_exclude setting is ignored then; not sure)/ Looking at the Capistrano 2.3.0 announcement (http:// weblog.jamisbuck.org/2008/5/2/capistrano-2-3-0), it looks like somebody had the same exact problem (comment # 31 by Thomas, which mentions the --tags option being the problem). -Mirko On May 26, 11:45 pm, Mirko <[EMAIL PROTECTED]> wrote:Perfect! I'll use copy_exclude along with git_shallow_clone, which should make for a nice and efficient git deployment. Thanks. -Mirko On 26 May, 17:30, Jamis Buck <[EMAIL PROTECTED]> wrote:If you're using the :copy strategy, with :copy_cache set to true, thenyou can set :copy_exclude to an array containing ".git" to have it exclude the .git directory, e.g.:set :deploy_via, :copy set :copy_cache, true set :copy_exclude, %w(.git)(This only works with cap 2.3 and later.)- JamisOn May 26, 2008, at 5:05 PM, Mirko wrote:I am using Cap 2.3.0, which I believe is the latest version. And it definitely still includes the .git directory in the .tar.gz file.But doing a shallow clone sounds like the way to go, so I will give this a shot. Thanks for the hint!-MirkoOn 25 May, 09:28, "Scott Chacon" <[EMAIL PROTECTED]> wrote:What version of Cap are you using? The newer one _should_ be removingthe .git directory. However, it's still not very efficient, because it just checks out everything and then removes the '.git' dir - youmight want to try the 'set :git_shallow_clone, 1' command, whichshould be closer to an export and will leave the .git dir but shouldnot include much in it.ScottOn Sun, May 25, 2008 at 9:11 AM, Mirko <[EMAIL PROTECTED]> wrote:We are using Capistrano to deploy an application stored in Git. Wespecify "set :deploy_via, :copy" to transfer a tarball via ssh, ratherthan checking out the code on the remote server. All of this worksgreat, except for one minor hitch:After we accidentally checked a large file into Git, deployments were suddenly taking a long time. Even after we removed the file, thissituation did not improve. This turned out to be because the tarballincludes not just the code, but also the ".git" directory, which contains the entire version history. So even if we hadn't checked in a huge file right now, this style of deployment would eventually become very slow as the revision history grows (particularly since manybroadband connections are still fairly limited in upload bandwidth).What would be the easiest way to modify the Capistrano / Gitdeployment tasks to exclude the ".git" directory? Do you think thisshould be the default?-Mirkosmime.p7s 3KDownload--~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
smime.p7s
Description: S/MIME cryptographic signature
