socialcast-git-extensions 2.2.13 → 2.3.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.
@@ -4,7 +4,5 @@ require File.join(File.dirname(__FILE__), '..', 'lib', 'socialcast-git-extension
4
4
  include Socialcast::Git
5
5
 
6
6
  head_branch = ARGV.first || 'master'
7
- reset_branch('prototype', head_branch)
7
+ reset_branch('prototype', head_branch, :share => true)
8
8
  reset_branch('last_known_good_prototype', head_branch)
9
-
10
- share "#worklog resetting prototype branch #scgitx"
@@ -4,7 +4,5 @@ require File.join(File.dirname(__FILE__), '..', 'lib', 'socialcast-git-extension
4
4
  include Socialcast::Git
5
5
 
6
6
  head_branch = ARGV.first || 'last_known_good_staging'
7
- reset_branch('staging', head_branch)
7
+ reset_branch('staging', head_branch, :share => (head_branch != 'last_known_good_staging')
8
8
  reset_branch('last_known_good_staging', head_branch)
9
-
10
- share "#worklog resetting staging branch #scgitx"
@@ -20,17 +20,23 @@ module Socialcast
20
20
  branch = branch.split('/').last if options[:remote]
21
21
  branches << branch unless RESERVED_BRANCHES.include?(branch)
22
22
  end
23
- branches
23
+ branches.uniq
24
24
  end
25
- def reset_branch(branch, head_branch = 'master')
25
+ def reset_branch(branch, head_branch = 'master', options = {})
26
26
  return if branch == head_branch
27
+
28
+ HighLine.say "resetting <%= color('#{branch}', :green) %> branch to <%= color('#{head_branch}', :green) %>"
29
+
27
30
  run_cmd "git checkout #{head_branch}"
28
31
  run_cmd "git pull"
32
+ removed_branches = branches :remote => true, :merged => "origin/#{branch}"
29
33
  run_cmd "git branch -D #{branch}" rescue nil
30
34
  run_cmd "git push origin :#{branch}" rescue nil
31
35
  run_cmd "git checkout -b #{branch}"
32
36
  run_cmd "grb publish #{branch}"
33
37
  run_cmd "git checkout #{head_branch}"
38
+
39
+ share "#worklog resetting #{branch} branch to #{head_branch} #scgitx\n\nthe following branches were affected:\n#{removed_branches.collect {|b| '* ' + b + "\n" } }" if options[:share]
34
40
  end
35
41
 
36
42
  def integrate(branch, destination_branch = 'staging')
@@ -1,5 +1,5 @@
1
1
  module Socialcast
2
2
  module Gitx
3
- VERSION = "2.2.13"
3
+ VERSION = "2.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socialcast-git-extensions
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
- - 2
9
- - 13
10
- version: 2.2.13
8
+ - 3
9
+ - 0
10
+ version: 2.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Sonnek