How does Capistrano work by default?

Ok, before you downvote, hear me out… There are lots of walkthroughs online for deploying cakePHP/Wordpress/Drupal/Symfony via Capistrano and the projects own document is pretty good, but there’s not a lot of coverage over what Capistrano actually does by default. Specifically, do a git checkout to folder /timestamp, /most-recent-timestamp to /current, webroot having previously been symlinked to /current.

I ask this question because we have a non-standard, hacked capistrano deploy process for a few legacy reasons and I’d like to bring us into alignment with the default behavior. In order to do so, I’d like background in what, exactly capistrano’s default behavior actually is.

  • How can I print my git tags in Capistrano as part of my deploy task?
  • git clone stuck during a Capistrano deploy
  • Capistrano 3 copy strategy equivalent
  • Trouble using Capistrano with a local git repository
  • Capistrano uploads the .git directory
  • Capistrano error - Invalid options(s): known_hosts
  • cp -Ra /home/username/deploy/shared/./ /home/username/deploy/releases/20121026170156/: this command takes forever to complete and I don’t see anydocumentation of /shared being used this way: what is the typical role played by /shared?

  • How to create a Git pull request from within Eclipse
  • When creating a new git repository with 40,000 things, so I have to uncomment each in the COMMIT file?
  • Remove file from git repository (history)
  • Jenkins CI configuration: Build/test/deploy scenarios
  • Fatal: git was built without support for git-add--interactive (NO_PERL=1)
  • Execute child process in Node which takes control of the console
  • One Solution collect form web for “How does Capistrano work by default?”

    While probably only the start to the answer, one of the best ways to understand any FOSS project is via the source.

    Coming from the PHP world, you may be unfamiliar about how a Ruby Gem is composed. Gems are made available to the system path [as an executable] by the presence of file in the /bin dir of the gem. Capistrano’s is here – and from this you can see where begins the process of calling cap production deploy.

    require 'capistrano/cli'
    Capistrano::CLI.execute
    

    In this case it loads the CLI library, and then calls a command therein. Start there to trace what you need.

    Git Baby is a git and github fan, let's start git clone.