optimis-workflow-scripts 0.0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,19 @@ module OptimisWorkflow
10
10
 
11
11
  @feature_branch = `git branch | grep '\*' | awk '{print $2}'`
12
12
  end
13
+
14
+ def local_stuff
15
+ update_parent_branch
16
+ rebase_feature_with_parent
17
+ run_tests
18
+ integrate_with_parent
19
+ end
20
+
21
+ def remote_stuff
22
+ # currently nothing needs to be done here b/c we're inserting a hook
23
+ # into the commit msg that will get sent to pivotal via a github
24
+ # post-receive callback.
25
+ end
13
26
 
14
27
  def self.modified_files
15
28
  @modified_files ||= `git ls-files --modified && git ls-files --deleted && git ls-files --unmerged`
@@ -26,29 +39,23 @@ module OptimisWorkflow
26
39
  def update_parent_branch
27
40
  system "git checkout #{parent_branch}"
28
41
  system "git pull origin #{parent_branch}"
29
- system "git checkout #{feature_branch}"
30
- system "git rebase #{parent_branch}"
31
42
  end
32
43
 
33
44
  def run_tests
34
45
  system "rake build"
35
46
  fail "\n\nWhoops! You have failing tests! All tests must be passing before finishing the feature.\n\n" if $?.exitstatus == 1
36
47
  end
37
-
38
- def local_stuff
39
- update_parent_branch
40
- run_tests
48
+
49
+ def rebase_feature_with_parent
50
+ system "git checkout #{feature_branch}"
51
+ system "git rebase #{parent_branch}"
52
+ end
53
+
54
+ def integrate_with_parent
41
55
  system "git checkout #{parent_branch}"
42
- system "git merge --squash #{feature_branch}"
43
- system "git commit -m '#{commit_msg} #{commit_msg_suffix}'"
56
+ system "git merge --no-ff #{feature_branch}"
44
57
  system "git push origin #{parent_branch}"
45
58
  end
46
-
47
- def remote_stuff
48
- # currently nothing needs to be done here b/c we're inserting a hook
49
- # into the commit msg that will get sent to pivotal via a github
50
- # post-receive callback.
51
- end
52
59
  end
53
60
  end
54
61
  end
@@ -28,13 +28,13 @@ module OptimisWorkflow
28
28
 
29
29
  def do_deploy
30
30
  system "git checkout #{feature_branch}"
31
- system "git push -f origin #{feature_branch}:staging"
31
+ system "git push -f origin #{feature_branch}:#{parent_branch}"
32
32
  end
33
33
 
34
34
  def update_master
35
35
  system "git checkout master"
36
36
  system "git pull origin master"
37
- system "git merge stable"
37
+ system "git merge #{parent_branch}"
38
38
  end
39
39
 
40
40
  def commit_msg_suffix
@@ -42,7 +42,7 @@ module OptimisWorkflow
42
42
  end
43
43
 
44
44
  def parent_branch
45
- 'stable'
45
+ 'hotfix'
46
46
  end
47
47
  end
48
48
 
metadata CHANGED
@@ -4,10 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
+ - 4
7
8
  - 0
8
- - 3
9
- - 1
10
- version: 0.0.3.1
9
+ version: 0.4.0
11
10
  platform: ruby
12
11
  authors:
13
12
  - Alex Sharp
@@ -15,13 +14,13 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-04-21 00:00:00 -07:00
17
+ date: 2010-10-08 00:00:00 -07:00
19
18
  default_executable:
20
19
  dependencies: []
21
20
 
22
21
  description: Scripts include git workflow scripts that integrate with pivotal tracker.
23
22
  email:
24
- - asharp@optimiscorp.com
23
+ - ajsharp@gmail.com
25
24
  executables:
26
25
  - finish-feature
27
26
  - start-feature