socialcast-git-extensions 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
data/bin/git-reset-staging
CHANGED
@@ -3,8 +3,9 @@
|
|
3
3
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'socialcast-git-extensions.rb')
|
4
4
|
include Socialcast
|
5
5
|
|
6
|
-
|
7
|
-
reset_branch('
|
6
|
+
head_branch = ARGV.first || 'last_known_good_stging'
|
7
|
+
reset_branch('staging', head_branch)
|
8
|
+
reset_branch('last_known_good_staging', head_branch)
|
8
9
|
|
9
10
|
is_quiet = ARGV.delete("--quiet") || ARGV.delete("-q")
|
10
11
|
run_cmd "socialcast share '#worklog resetting staging branch #scgitx'" unless is_quiet
|
@@ -28,14 +28,15 @@ module Socialcast
|
|
28
28
|
end
|
29
29
|
branches
|
30
30
|
end
|
31
|
-
def reset_branch(branch)
|
32
|
-
|
31
|
+
def reset_branch(branch, head_branch = 'master')
|
32
|
+
return if branch == head_branch
|
33
|
+
run_cmd "git checkout #{head_branch}"
|
33
34
|
run_cmd "git pull"
|
34
35
|
run_cmd "git branch -D #{branch}" rescue nil
|
35
36
|
run_cmd "git push origin :#{branch}" rescue nil
|
36
37
|
run_cmd "git checkout -b #{branch}"
|
37
38
|
run_cmd "grb publish #{branch}"
|
38
|
-
run_cmd "git checkout
|
39
|
+
run_cmd "git checkout #{head_branch}"
|
39
40
|
end
|
40
41
|
|
41
42
|
def integrate(branch, destination_branch = 'staging')
|
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: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 2.1.
|
9
|
+
- 1
|
10
|
+
version: 2.1.1
|
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-10-17 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: grit
|
@@ -162,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
162
|
requirements: []
|
163
163
|
|
164
164
|
rubyforge_project: socialcast-git-extensions
|
165
|
-
rubygems_version: 1.8.
|
165
|
+
rubygems_version: 1.8.10
|
166
166
|
signing_key:
|
167
167
|
specification_version: 3
|
168
168
|
summary: git extension scripts for socialcast workflow
|