thegarage-gitx 2.0.4 → 2.0.5

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: c0eea3b7dfcd17fef52f113c503608c7db7ad81d
4
- data.tar.gz: 04eadf25b646e3aaff99d96e64c3adf1617b6df7
3
+ metadata.gz: 047d8374efd4e4538e833ad29cd8810dd46ce374
4
+ data.tar.gz: 21128daae406df84dba354facddb350a8269d0af
5
5
  SHA512:
6
- metadata.gz: bea835e6b0f8984ef7ce84c487a67d82ca47220853b1a25b548e21b04e132451bfd575b887730f50b9cc8e26c23ad57d171f8c5a3e8578f5cda4e9860129f44a
7
- data.tar.gz: cb1ca449eb9a0923b03f10ee20c83d2fff59001df18ef50c7a6137af194256956884c17db8137931bf3b6c0821465cabc91da9bd470508b841b10c67e8e1a793
6
+ metadata.gz: cc98d873a852cc18e45204c8877277348b014c4c40858df5a64b8b315a69b1c97cb139f12e31ffaa48ae47d322ddc90611542df6f73ac5b7ebd7d9cfde20c12d
7
+ data.tar.gz: f7e2341f50f7d43d0ada6df0aba04da4e08eef7f6e9a9e1f10123d896b6ffa6220e1844fa75ab8c77f234d8451387ac073185f911f1cb965b28911c1ba0f1e11
@@ -32,7 +32,7 @@ module Thegarage
32
32
  end
33
33
 
34
34
  def checkout_branch(branch_name)
35
- repo.head = "refs/heads/#{branch_name}"
35
+ run_cmd "git checkout #{branch_name}"
36
36
  end
37
37
 
38
38
  # lookup the current branch of the repo
@@ -8,7 +8,7 @@ module Thegarage
8
8
  class CleanupCommand < BaseCommand
9
9
  desc 'cleanup', 'Cleanup branches that have been merged into master from the repo'
10
10
  def cleanup
11
- run_cmd "git checkout #{Thegarage::Gitx::BASE_BRANCH}"
11
+ checkout_branch Thegarage::Gitx::BASE_BRANCH
12
12
  run_cmd "git pull"
13
13
  run_cmd 'git remote prune origin'
14
14
 
@@ -23,7 +23,7 @@ module Thegarage
23
23
  refresh_branch_from_remote target_branch
24
24
  run_cmd "git pull . #{branch}"
25
25
  run_cmd "git push origin HEAD"
26
- run_cmd "git checkout #{branch}"
26
+ checkout_branch branch
27
27
  end
28
28
 
29
29
  private
@@ -32,7 +32,7 @@ module Thegarage
32
32
  def refresh_branch_from_remote(target_branch)
33
33
  run_cmd "git branch -D #{target_branch}", :allow_failure => true
34
34
  run_cmd "git fetch origin"
35
- run_cmd "git checkout #{target_branch}"
35
+ checkout_branch target_branch
36
36
  end
37
37
  end
38
38
  end
@@ -22,13 +22,13 @@ module Thegarage
22
22
  say "branch to "
23
23
  say last_known_good_tag, :green
24
24
 
25
- run_cmd "git checkout #{Thegarage::Gitx::BASE_BRANCH}"
25
+ checkout_branch Thegarage::Gitx::BASE_BRANCH
26
26
  run_cmd "git branch -D #{bad_branch}", :allow_failure => true
27
27
  run_cmd "git push origin --delete #{bad_branch}", :allow_failure => true
28
28
  run_cmd "git checkout -b #{bad_branch} #{last_known_good_tag}"
29
29
  run_cmd "git push origin #{bad_branch}"
30
30
  run_cmd "git branch --set-upstream-to origin/#{bad_branch}"
31
- run_cmd "git checkout #{Thegarage::Gitx::BASE_BRANCH}"
31
+ checkout_branch Thegarage::Gitx::BASE_BRANCH
32
32
  end
33
33
 
34
34
  private
@@ -17,7 +17,7 @@ module Thegarage
17
17
  assert_not_protected_branch!(branch, 'release')
18
18
  UpdateCommand.new.update
19
19
 
20
- run_cmd "git checkout #{Thegarage::Gitx::BASE_BRANCH}"
20
+ checkout_branch Thegarage::Gitx::BASE_BRANCH
21
21
  run_cmd "git pull origin #{Thegarage::Gitx::BASE_BRANCH}"
22
22
  run_cmd "git pull . #{branch}"
23
23
  run_cmd "git push origin HEAD"
@@ -1,5 +1,5 @@
1
1
  module Thegarage
2
2
  module Gitx
3
- VERSION = '2.0.4'
3
+ VERSION = '2.0.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thegarage-gitx
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Sonnek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-05 00:00:00.000000000 Z
11
+ date: 2014-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged