capistrano-git-copy 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +36 -0
- data/Rakefile +1 -0
- data/capistrano-git-copy.gemspec +25 -0
- data/lib/capistrano-git-copy.rb +0 -0
- data/lib/capistrano/git/copy.rb +2 -0
- data/lib/capistrano/git/copy/deploy.rb +1 -0
- data/lib/capistrano/git/copy/tasks/deploy.cap +34 -0
- data/lib/capistrano/git/copy/version.rb +7 -0
- data/lib/capistrano/git_copy.rb +1 -0
- metadata +98 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 90b1a801508b4e93149fa20b38570b91e685f865
|
4
|
+
data.tar.gz: 4a5f529dbb78d58f7ccaadc0c634af1229c8deae
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 59103edd7941755f88fce4197840fd3167766bc99a44ebb3cda64e36bee5f1af221ee77a71dd5255d8033ee5e9ce2560ed6adc780510b96c60def1dedd102a9c
|
7
|
+
data.tar.gz: 922359ed84e42518243e4616112df09db2d8b778f8ebd4c7c40afd757ef90a4fb892c50829fa9875ab30dc0236831f686001ec9b81cbc52f0dae0628198c5247
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Florian Schwab
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Capistrano::GIT::Copy
|
2
|
+
|
3
|
+
Creates a tar archive from the locale git repository and uploads it to the remote server.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'capistrano', '~> 3.0.0'
|
10
|
+
gem 'capistrano-git-copy'
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install capistrano-git-copy
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
Require in `Capfile` to use the default task:
|
23
|
+
|
24
|
+
require 'capistrano/git/copy'
|
25
|
+
|
26
|
+
Now use `git_copy` as your SCM type:
|
27
|
+
|
28
|
+
set :scm, :git_copy
|
29
|
+
|
30
|
+
## Contributing
|
31
|
+
|
32
|
+
1. Fork it
|
33
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
34
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
35
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
36
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'capistrano/git/copy/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "capistrano-git-copy"
|
8
|
+
spec.version = Capistrano::Git::Copy::VERSION
|
9
|
+
spec.authors = ["Florian Schwab"]
|
10
|
+
spec.email = ["me@ydkn.de"]
|
11
|
+
spec.description = %q{Copy local git repository deploy strategy for capistrano}
|
12
|
+
spec.summary = %q{Copy local git repository deploy strategy for capistrano}
|
13
|
+
spec.homepage = "https://github.com/ydkn/capistrano-git-copy"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency 'capistrano', '>= 3.0.0'
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
24
|
+
spec.add_development_dependency 'rake'
|
25
|
+
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path("../tasks/deploy.cap", __FILE__)
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'tmpdir'
|
2
|
+
|
3
|
+
namespace :git_copy do
|
4
|
+
|
5
|
+
task :wrapper do
|
6
|
+
on roles :all do
|
7
|
+
set :local_repo_path, File.join(Dir.tmpdir, "#{fetch(:application)}")
|
8
|
+
set :local_tar_file, File.join(Dir.tmpdir, "#{fetch(:application)}.tar.gz")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
task :check do; end
|
13
|
+
task :clone do; end
|
14
|
+
|
15
|
+
desc 'Create tar and upload to server'
|
16
|
+
task update: :'git_copy:wrapper' do
|
17
|
+
system("rm -rf #{fetch(:local_repo_path)}")
|
18
|
+
system("git clone #{fetch(:repo_url)} #{fetch(:local_repo_path)} > /dev/null 2> /dev/null")
|
19
|
+
|
20
|
+
on roles :all do
|
21
|
+
system("cd #{fetch(:local_repo_path)} && git archive #{fetch(:branch)} | gzip --best > #{fetch(:local_tar_file)}")
|
22
|
+
|
23
|
+
upload! fetch(:local_tar_file), "#{fetch(:tmp_dir)}/#{File.basename(fetch(:local_tar_file))}"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
desc 'Extract tar to release path'
|
28
|
+
task create_release: :'git_copy:update' do
|
29
|
+
on roles :all do
|
30
|
+
execute :mkdir, '-p', release_path
|
31
|
+
execute :tar, '-f', "#{fetch(:tmp_dir)}/#{File.basename(fetch(:local_tar_file))}", '-x -C', release_path
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'capistrano/git/copy'
|
metadata
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-git-copy
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Florian Schwab
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-12-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.3'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Copy local git repository deploy strategy for capistrano
|
56
|
+
email:
|
57
|
+
- me@ydkn.de
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- .gitignore
|
63
|
+
- Gemfile
|
64
|
+
- LICENSE.txt
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- capistrano-git-copy.gemspec
|
68
|
+
- lib/capistrano-git-copy.rb
|
69
|
+
- lib/capistrano/git/copy.rb
|
70
|
+
- lib/capistrano/git/copy/deploy.rb
|
71
|
+
- lib/capistrano/git/copy/tasks/deploy.cap
|
72
|
+
- lib/capistrano/git/copy/version.rb
|
73
|
+
- lib/capistrano/git_copy.rb
|
74
|
+
homepage: https://github.com/ydkn/capistrano-git-copy
|
75
|
+
licenses:
|
76
|
+
- MIT
|
77
|
+
metadata: {}
|
78
|
+
post_install_message:
|
79
|
+
rdoc_options: []
|
80
|
+
require_paths:
|
81
|
+
- lib
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - '>='
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
requirements: []
|
93
|
+
rubyforge_project:
|
94
|
+
rubygems_version: 2.0.3
|
95
|
+
signing_key:
|
96
|
+
specification_version: 4
|
97
|
+
summary: Copy local git repository deploy strategy for capistrano
|
98
|
+
test_files: []
|