capistrano-simplegit 0.0.9 → 0.1.0

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: 6f2185fa8df96263b510dd22c1f1dabdff174556
4
- data.tar.gz: 270ccbddab8ecae86329bdb5531973f7f93a32ae
3
+ metadata.gz: f397baaec282fda7233f5e49534b252a60534731
4
+ data.tar.gz: af76eb51e790e1a60824535058dd09b050e5cf38
5
5
  SHA512:
6
- metadata.gz: 463c95ba2f610046bf8a9e6e2d393d215b49d97d124c68f9f01e2d0b156d55eb3c464d31c2f86f2eb284ac5a2d5e6a15dad6b2048e365cd8df6a74d490197fb7
7
- data.tar.gz: 17fa3df66acd9063e68f091e6fced5e51dc58197182de9fc6942e45adb1c2f3b38f984526287609e504be85f7eba1e09883a190ea0ec9973253866d2f28b802a
6
+ metadata.gz: e9e5ab7021f3068bed5b3af0fdbb84085460b333021b9fe394c3641fbbb1b70d42185c6253167e0efd675488ce8c73b22a89b110ebf63ae70702b1ad752251cf
7
+ data.tar.gz: 7b21378a48008e590eb432c2c416f56851f74a46e1e4822133678806a6d7e1205f5ea50533031668df51d1953266063f057f322cde7a0dd47d4e8d4cb601b9ba
@@ -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.9'
6
+ spec.version = '0.1.0'
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}
@@ -17,7 +17,11 @@ namespace :simplegit do
17
17
 
18
18
  within fetch(:simplegit_deploy) do
19
19
  execute "cd #{fetch(:simplegit_deploy)} && git fetch"
20
- execute "git checkout -b #{fetch(:simplegit_branch)} origin/#{fetch(:simplegit_branch)}"
20
+ if test "[ git show-branch #{fetch(:simplegit_branch)} ]"
21
+ execute "git checkout #{fetch(:simplegit_branch)} ; git reset --hard origin/#{fetch(:simplegit_branch)}"
22
+ else
23
+ execute "git checkout -b #{fetch(:simplegit_branch)} origin/#{fetch(:simplegit_branch)}"
24
+ end
21
25
  execute "git submodule update --init --recursive"
22
26
  end
23
27
  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.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Riley