capistrano-scm-git_with_submodule_and_resolv_symlinks 0.1.0.beta1 → 0.1.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ced4cf4ac7b9738e5f3136f6558f6f4a87026210
|
4
|
+
data.tar.gz: c7c3366c5af49075829b1648b01f1fc2c1ca4228
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 641ed78f862029ec2e357adc410599088627423c94b096c7372d6c476fb16c359f179f92f21d06cf960889e1c173760bd9c729c5111c86c5af78f7208de906f4
|
7
|
+
data.tar.gz: 99498120aaba84a8fb37f734877a93773cdfd005e0c714d3764fa13dbf5c6992ad3da9a21cd11592e9df9c554e1eca793de8ec33ec24bffd92667debc0706611
|
data/README.md
CHANGED
@@ -2,16 +2,18 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/capistrano-scm-git_with_submodule_and_resolv_symlinks.png)](https://rubygems.org/gems/capistrano-scm-git_with_submodule_and_resolv_symlinks) [![Build Status](https://secure.travis-ci.org/groovenauts/capistrano-scm-git_with_submodule_and_resolv_symlinks.png)](https://travis-ci.org/groovenauts/capistrano-scm-git_with_submodule_and_resolv_symlinks)
|
4
4
|
|
5
|
-
|
5
|
+
This is Capistrano [Custom SCM plugin](http://capistranorb.com/documentation/advanced-features/custom-scm/), which supports:
|
6
6
|
|
7
|
-
|
7
|
+
- Git with submodule
|
8
|
+
- Resolving symlinks
|
9
|
+
- Subtree
|
8
10
|
|
9
11
|
## Installation
|
10
12
|
|
11
13
|
Add this line to your application's Gemfile:
|
12
14
|
|
13
15
|
```ruby
|
14
|
-
gem 'capistrano-scm-git_with_submodule_and_resolv_symlinks'
|
16
|
+
gem 'capistrano-scm-git_with_submodule_and_resolv_symlinks', require: false
|
15
17
|
```
|
16
18
|
|
17
19
|
And then execute:
|
@@ -22,9 +24,12 @@ Or install it yourself as:
|
|
22
24
|
|
23
25
|
$ gem install capistrano-scm-git_with_submodule_and_resolv_symlinks
|
24
26
|
|
25
|
-
|
27
|
+
And add these lines to your Capfile:
|
26
28
|
|
27
|
-
|
29
|
+
```ruby
|
30
|
+
require "capistrano/scm/git_with_submodule_and_resolv_symlinks"
|
31
|
+
install_plugin Capistrano::SCM::GitWithSubmoduleAndResolvSymlinks
|
32
|
+
```
|
28
33
|
|
29
34
|
## Development
|
30
35
|
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# This trick lets us access the GitWithSubmoduleAndResolvSymlinks plugin within `on` blocks.
|
2
|
+
scm = self
|
3
|
+
|
4
|
+
namespace scm.nsp do
|
5
|
+
desc "Upload the git wrapper script, this script guarantees that we can script git without getting an interactive prompt"
|
6
|
+
task :wrapper do
|
7
|
+
on release_roles :all do
|
8
|
+
execute :mkdir, "-p", File.dirname(fetch(:"#{scm.nsp}_wrapper_path"))
|
9
|
+
upload! StringIO.new("#!/bin/sh -e\nexec /usr/bin/ssh -o PasswordAuthentication=no -o StrictHostKeyChecking=no \"$@\"\n"), fetch(:"#{scm.nsp}_wrapper_path")
|
10
|
+
execute :chmod, "700", fetch(:"#{scm.nsp}_wrapper_path")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
desc "Check that the repository is reachable"
|
15
|
+
task check: :"#{scm.nsp}:wrapper" do
|
16
|
+
fetch(:branch)
|
17
|
+
on release_roles :all do
|
18
|
+
with fetch(:"#{scm.nsp}_environmental_variables") do
|
19
|
+
scm.check_repo_is_reachable
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
desc "Clone the repo to the cache"
|
25
|
+
task clone: :"#{scm.nsp}:wrapper" do
|
26
|
+
on release_roles :all do
|
27
|
+
if scm.repo_mirror_exists?
|
28
|
+
info t(:mirror_exists, at: repo_path)
|
29
|
+
else
|
30
|
+
within deploy_path do
|
31
|
+
with fetch(:"#{scm.nsp}_environmental_variables") do
|
32
|
+
scm.clone_repo
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
desc "Update the repo mirror to reflect the origin state"
|
40
|
+
task update: :"#{scm.nsp}:clone" do
|
41
|
+
on release_roles :all do
|
42
|
+
within repo_path do
|
43
|
+
with fetch(:"#{scm.nsp}_environmental_variables") do
|
44
|
+
scm.update_mirror
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
desc "Copy repo to releases"
|
51
|
+
task create_release: :"#{scm.nsp}:update" do
|
52
|
+
on release_roles :all do
|
53
|
+
with fetch(:"#{scm.nsp}_environmental_variables") do
|
54
|
+
within repo_path do
|
55
|
+
execute :mkdir, "-p", release_path
|
56
|
+
scm.release
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
desc "Determine the revision that will be deployed"
|
63
|
+
task :set_current_revision do
|
64
|
+
on release_roles :all do
|
65
|
+
within repo_path do
|
66
|
+
with fetch(:"#{scm.nsp}_environmental_variables") do
|
67
|
+
set :current_revision, scm.fetch_revision
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-scm-git_with_submodule_and_resolv_symlinks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YAMADA Tsuyoshi
|
@@ -99,6 +99,7 @@ files:
|
|
99
99
|
- capistrano-scm-git_with_submodule_and_resolv_symlinks.gemspec
|
100
100
|
- lib/capistrano/scm/git_with_submodule_and_resolv_symlinks.rb
|
101
101
|
- lib/capistrano/scm/git_with_submodule_and_resolv_symlinks/version.rb
|
102
|
+
- lib/capistrano/scm/tasks/git_with_submodule_and_resolv_symlinks.rake
|
102
103
|
homepage: https://github.com/groovenauts/capistrano-scm-git_with_submodule_and_resolv_symlinks
|
103
104
|
licenses:
|
104
105
|
- MIT
|