capistrano-simplegit 0.0.8 → 0.0.9

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: 469834aa216deeda12f802e0fdf3a6e3e6782dbc
4
- data.tar.gz: 097c3d8f11e544182fc8ae837feb1c06b9035ad1
3
+ metadata.gz: 6f2185fa8df96263b510dd22c1f1dabdff174556
4
+ data.tar.gz: 270ccbddab8ecae86329bdb5531973f7f93a32ae
5
5
  SHA512:
6
- metadata.gz: 775b003891aa5cb6c0dc1119bbc8a5f7c65e55802cc7ab0ce9ce2cd3ffab02bb4454196d5d0917947dc485ce2c411caa37bca1bcaef704bdbcadd567c398a3a9
7
- data.tar.gz: 484ec191a4c3f576e0541fbe2c7a575c694f36b78bc76ae4a23ff244dfd44540bf47c6735254b799bc234b40f2cb723087b5000bdddad9d16622e725335ef151
6
+ metadata.gz: 463c95ba2f610046bf8a9e6e2d393d215b49d97d124c68f9f01e2d0b156d55eb3c464d31c2f86f2eb284ac5a2d5e6a15dad6b2048e365cd8df6a74d490197fb7
7
+ data.tar.gz: 17fa3df66acd9063e68f091e6fced5e51dc58197182de9fc6942e45adb1c2f3b38f984526287609e504be85f7eba1e09883a190ea0ec9973253866d2f28b802a
@@ -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.8'
6
+ spec.version = '0.0.9'
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}
@@ -10,21 +10,16 @@ namespace :simplegit do
10
10
  execute "cd #{fetch(:simplegit_deploy)} && git remote add origin #{fetch(:simplegit_repo)}"
11
11
  end
12
12
 
13
- info "--> Updating code from remote repository"
14
-
15
- begin
16
- execute "cd #{fetch(:simplegit_deploy)} && git fetch"
17
- rescue
13
+ unless test :git, :'ls-remote', fetch(:repo_url)
18
14
  error "Unable to connect to remote repository, check your configuration, and that a valid ssh key exists for remote server."
19
- exit
15
+ exit 1
20
16
  end
21
17
 
22
- begin
23
- execute "cd #{fetch(:simplegit_deploy)} && git show-branch #{fetch(:simplegit_branch)} && git checkout #{fetch(:simplegit_branch)} ; git reset --hard origin/#{fetch(:simplegit_branch)}"
24
- rescue
25
- execute "cd #{fetch(:simplegit_deploy)} && git checkout -b #{fetch(:simplegit_branch)} origin/#{fetch(:simplegit_branch)} ;"
18
+ within fetch(:simplegit_deploy) do
19
+ execute "cd #{fetch(:simplegit_deploy)} && git fetch"
20
+ execute "git checkout -b #{fetch(:simplegit_branch)} origin/#{fetch(:simplegit_branch)}"
21
+ execute "git submodule update --init --recursive"
26
22
  end
27
- execute "git submodule update --init --recursive"
28
23
  end
29
24
  end
30
25
 
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.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Riley