capistrano-simplegit 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05aaf03aaaf00d1f8b9cb5f3afa593a1582ac9b6
4
- data.tar.gz: b7f53fe7551b7d78385eede33da469817a7cd9d1
3
+ metadata.gz: 46049bdab782dc9e6f9f997338b11e5f194d19c2
4
+ data.tar.gz: cf217e0e381a2fc499457e13d6714e9850fe2207
5
5
  SHA512:
6
- metadata.gz: 64bddacf7fc272b97ca5e835c63f0ecb53ce55ed589e6c4c7872231c7e5e2ddb98f1a0d04055eeb9f4ff90b1436eba0f1ae31177774915c5b5133107442e6cf7
7
- data.tar.gz: 754bb0cbf410aad5e16ff8d8155af6e7ab8edebcb72761a4c2d4c9cafaa2e990eec7ced52b8a24ad3cdb7e1165bc14f1a5511c510e07bbc52edcf5c561f3d3aa
6
+ metadata.gz: 50b7cd3738ed6a37f76088bed0cb8f58da7595ca192fc9d97525974972e7471a22e1d656a90f857c62561d015b488a02241dab939e02fb6b72d08c859dc6670f
7
+ data.tar.gz: 1137322c4125ccfde50c10456a583c5e09af3160847ead61298098e60280fbc7445650594b81cc2d44aa38dcdc3e8d547ef14012c2afb0c390f22ce3295313d5
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'capistrano-simplegit'
6
- spec.version = '0.0.5'
6
+ spec.version = '0.0.6'
7
7
  spec.authors = ['Ross Riley']
8
8
  spec.email = ['riley.ross@gmail.com']
9
9
  spec.description = %q{A simple Git Deploy Command for Capistrano 3.x}
@@ -4,10 +4,10 @@ namespace :simplegit do
4
4
  task :deploy do
5
5
 
6
6
  on roles :all do
7
- info "--> Deploy from #{fetch(:repo_url)} on branch #{fetch(:branch)}"
7
+ info "--> Deploy from #{fetch(:simplegit_repo)} on branch #{fetch(:simplegit_branch)}"
8
8
 
9
9
  begin
10
- execute "ls #{fetch(:deploy_to)}/.git"
10
+ execute "ls #{fetch(:simplegit_deploy)}/.git"
11
11
  rescue
12
12
  invoke 'simplegit:prepare'
13
13
  end
@@ -15,16 +15,16 @@ namespace :simplegit do
15
15
  info "--> Updating code from remote repository"
16
16
 
17
17
  begin
18
- execute "cd #{fetch(:deploy_to)} && git fetch"
18
+ execute "cd #{fetch(:simplegit_deploy)} && git fetch"
19
19
  rescue
20
20
  error "Unable to connect to remote repository, check your configuration, and that a valid ssh key exists for remote server."
21
21
  exit
22
22
  end
23
23
 
24
24
  begin
25
- execute "cd #{fetch(:deploy_to)} && git show-branch #{fetch(:branch)} && git checkout #{fetch(:branch)} ; git reset --hard origin/#{fetch(:branch)}"
25
+ execute "cd #{fetch(:simplegit_deploy)} && git show-branch #{fetch(:simplegit_branch)} && git checkout #{fetch(:simplegit_branch)} ; git reset --hard origin/#{fetch(:simplegit_branch)}"
26
26
  rescue
27
- execute "cd #{fetch(:deploy_to)} && git checkout -b #{fetch(:branch)} origin/#{fetch(:branch)} ;"
27
+ execute "cd #{fetch(:simplegit_deploy)} && git checkout -b #{fetch(:simplegit_branch)} origin/#{fetch(:simplegit_branch)} ;"
28
28
  end
29
29
  execute "git submodule update --init --recursive"
30
30
  end
@@ -33,9 +33,20 @@ namespace :simplegit do
33
33
  desc 'Performs the initial setup and fetch of the repo'
34
34
  task :prepare do
35
35
  on roles :all do
36
- execute "cd #{fetch(:deploy_to)} && git init"
37
- execute "cd #{fetch(:deploy_to)} && git remote add origin #{fetch(:repo_url)}"
36
+ execute "cd #{fetch(:simplegit_deploy)} && git init"
37
+ execute "cd #{fetch(:simplegit_deploy)} && git remote add origin #{fetch(:simplegit_repo)}"
38
38
  end
39
39
  end
40
40
 
41
41
  end
42
+
43
+ namespace :load do
44
+
45
+ task :defaults do
46
+ set :simplegit_deploy, -> { fetch(:deploy_to) }
47
+ set :simplegit_repo, -> { fetch(:repo_url) }
48
+ set :simplegit_branch, -> { fetch(:branch) }
49
+
50
+ end
51
+
52
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-simplegit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Riley