Class: Capistrano::Deploy::SCM::Fs
- Inherits:
-
Base
- Object
- Base
- Capistrano::Deploy::SCM::Fs
- Defined in:
- lib/capistrano/recipes/deploy/scm/fs.rb
Instance Method Summary collapse
-
#checkout(revision, destination) ⇒ Object
(also: #export)
Simply does a copy from the :repository directory to the :destination directory.
- #head ⇒ Object
- #last_modified_directory ⇒ Object
-
#log(from = "", to = "") ⇒ Object
log: There’s no log, so it just echos from and to.
-
#query_revision(revision) ⇒ Object
No versioning, so this just returns the argument, with no modification.
Instance Method Details
#checkout(revision, destination) ⇒ Object Also known as: export
Simply does a copy from the :repository directory to the :destination directory.
13 14 15 |
# File 'lib/capistrano/recipes/deploy/scm/fs.rb', line 13 def checkout(revision, destination) !Capistrano::Deploy::LocalDependency.on_windows? ? "cp -R#{configuration[:copy_dereference_symlink]?'L':''} #{File.join(repository, revision.to_s)} #{destination}" : "xcopy #{File.join(repository,revision.to_s)} \"#{destination}\" /S/I/Y/Q/E" end |
#head ⇒ Object
7 8 9 |
# File 'lib/capistrano/recipes/deploy/scm/fs.rb', line 7 def head last_modified_directory end |
#last_modified_directory ⇒ Object
30 31 32 |
# File 'lib/capistrano/recipes/deploy/scm/fs.rb', line 30 def last_modified_directory File.basename(Dir.glob(File.join(variable(:repository), "*")).reject {|f| File.file? f }.sort_by {|o| File.ctime(o) }.shift) end |
#log(from = "", to = "") ⇒ Object
log: There’s no log, so it just echos from and to.
26 27 28 |
# File 'lib/capistrano/recipes/deploy/scm/fs.rb', line 26 def log(from="", to="") "No SCM: #{from} - #{to}" end |
#query_revision(revision) ⇒ Object
No versioning, so this just returns the argument, with no modification.
21 22 23 |
# File 'lib/capistrano/recipes/deploy/scm/fs.rb', line 21 def query_revision(revision) revision end |