socialcast-git-extensions 2.2.5 → 2.2.6
Sign up to get free protection for your applications and to get access to all the features.
data/bin/git-integrate
CHANGED
data/bin/git-promote
CHANGED
data/bin/git-release
CHANGED
@@ -5,7 +5,7 @@ include Socialcast::Gitx
|
|
5
5
|
include Socialcast::Git
|
6
6
|
|
7
7
|
branch = current_branch
|
8
|
-
|
8
|
+
protect_reserved_branches!(branch, 'release')
|
9
9
|
|
10
10
|
exit unless HighLine.agree("<%= color('Release #{branch} to production? (y/n)', :green) %>")
|
11
11
|
|
data/bin/git-reset-prototype
CHANGED
@@ -8,6 +8,4 @@ head_branch = ARGV.first || 'master'
|
|
8
8
|
reset_branch('prototype', head_branch)
|
9
9
|
reset_branch('last_known_good_prototype', head_branch)
|
10
10
|
|
11
|
-
HighLine.say "\n<%= color('Updating the following tickets to no longer be in prototype:', :red) %>"
|
12
|
-
|
13
11
|
share "#worklog resetting prototype branch #scgitx"
|
@@ -4,6 +4,9 @@ require 'socialcast-git-extensions/github'
|
|
4
4
|
|
5
5
|
module Socialcast
|
6
6
|
module Gitx
|
7
|
+
def protect_reserved_branches!(branch, mode)
|
8
|
+
abort("Cannot #{mode} reserved branch") if Socialcast::Git::RESERVED_BRANCHES.include?(branch)
|
9
|
+
end
|
7
10
|
def run_cmd(cmd)
|
8
11
|
HighLine.say "\n> <%= color('#{cmd.gsub("'", '')}', :red) %>"
|
9
12
|
raise "#{cmd} failed" unless system cmd
|
@@ -4,6 +4,7 @@ require 'grit'
|
|
4
4
|
module Socialcast
|
5
5
|
module Git
|
6
6
|
include Socialcast::Gitx
|
7
|
+
RESERVED_BRANCHES = %w{ HEAD master last_known_good_master staging last_known_good_staging next_release last_known_good_next_release }
|
7
8
|
|
8
9
|
def current_branch
|
9
10
|
repo = Grit::Repo.new(Dir.pwd)
|
@@ -11,7 +12,6 @@ module Socialcast
|
|
11
12
|
end
|
12
13
|
def branches(options = {})
|
13
14
|
branches = []
|
14
|
-
reserved_branches = %w{ HEAD master last_known_good_master staging last_known_good_staging next_release last_known_good_next_release }
|
15
15
|
args = []
|
16
16
|
args << '-r' if options[:remote]
|
17
17
|
args << '--merged' if options[:merged]
|
@@ -19,7 +19,7 @@ module Socialcast
|
|
19
19
|
output.each do |branch|
|
20
20
|
branch = branch.gsub(/\*/, '').strip.split(' ').first
|
21
21
|
branch = branch.split('/').last if options[:remote]
|
22
|
-
branches << branch unless
|
22
|
+
branches << branch unless RESERVED_BRANCHES.include?(branch)
|
23
23
|
end
|
24
24
|
branches
|
25
25
|
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:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 2.2.
|
9
|
+
- 6
|
10
|
+
version: 2.2.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Sonnek
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-11-18 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: grit
|