v2gpti 0.2.0.4 → 0.2.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb7fe1c58e20da7e1d498fca6800378197b4314a
4
- data.tar.gz: b5746858ddfffd3fca9fb1c442ae54c8e32432ac
3
+ metadata.gz: 96653de0af6eb4d4e0628e737d3c8168214b911b
4
+ data.tar.gz: 91098fcbb204c3800fced28249be0cb108007fa0
5
5
  SHA512:
6
- metadata.gz: 30613ae7a32c8d67e49f8e26f484d273594c63a5e65bbdaf35f1fe46d800bfe6fe2ce7b92e126e0fa561f411ab6e5f2d00132f2c6730b5ed65edc9fda736c5a8
7
- data.tar.gz: 88c18c003d1aca06435a64d90291345f1b300ed41bba0de774fae8ded0f0e80030243fce1c00d011c885a2af026fa97a05517fcf53562b8311ed784c0876588d
6
+ metadata.gz: 5886d17e06fc962fd0966a2bbed181ee8f7039ae89066ae469dd02898d94761571af54881edf4821be6e12a82d1b56cf2926548eea37196fdc952063d10a2d1e
7
+ data.tar.gz: 9e3e55b767b43ed87c808752c8b7d9bcb2ebe72d84f3efdd03585d6c8a4c66dc95c2cead134ae3125348d55ac7691ebb8b54a48bcbda6c1d00e1b4bcf2815fd9
@@ -41,7 +41,13 @@ class GitPivotalTrackerIntegration::Command::Deliver < GitPivotalTrackerIntegrat
41
41
 
42
42
  current_branch = GitPivotalTrackerIntegration::Util::Git.branch_name
43
43
 
44
+ puts "Merging from orgin develop..."
45
+ GitPivotalTrackerIntegration::Util::Shell.exec "git pull"
46
+
47
+ # checkout QA branch
48
+ # Merge develop into QA
44
49
  GitPivotalTrackerIntegration::Util::Shell.exec "git checkout QA"
50
+ GitPivotalTrackerIntegration::Util::Shell.exec "git pull"
45
51
  if (GitPivotalTrackerIntegration::Util::Shell.exec "git merge -s recursive --strategy-option theirs develop")
46
52
  puts "Merged 'develop' in to 'QA'"
47
53
  else
@@ -50,6 +56,7 @@ class GitPivotalTrackerIntegration::Command::Deliver < GitPivotalTrackerIntegrat
50
56
 
51
57
  puts "storyNAME:#{story.name}"
52
58
 
59
+ # Update version and build numbers
53
60
  build_number = story.name.dup
54
61
  build_number[0] = ""
55
62
  puts "storyNAME:#{story.name}"
@@ -86,7 +93,7 @@ class GitPivotalTrackerIntegration::Command::Deliver < GitPivotalTrackerIntegrat
86
93
  suggested_branch = "develop"
87
94
 
88
95
  if !suggested_branch.nil? && suggested_branch.length !=0 && current_branch != suggested_branch
89
- should_chage_branch = ask("Your currently checked out branch is '#{current_branch}'. Do you want to checkout '#{suggested_branch}' before starting?(Y/n)")
96
+ should_chage_branch = ask("Your currently checked out branch is '#{current_branch}'. You must be on the #{suggested_branch} branch to run this command.\n\n Do you want to checkout '#{suggested_branch}' before starting?(Y/n)")
90
97
  if should_chage_branch != "n"
91
98
  print "Checking out branch '#{suggested_branch}'...\n\n"
92
99
  GitPivotalTrackerIntegration::Util::Shell.exec "git checkout #{suggested_branch}"
@@ -167,7 +174,6 @@ end
167
174
  end
168
175
 
169
176
 
170
-
171
177
  def development_branch_name(story)
172
178
  prefix = "#{story.id}-"
173
179
  story_name = "#{story.name.gsub(/[^0-9a-z\\s]/i, '_')}"
@@ -34,23 +34,55 @@ class GitPivotalTrackerIntegration::Command::Release < GitPivotalTrackerIntegrat
34
34
  # * +nil+
35
35
  # @return [void]
36
36
  def run(filter)
37
- story = GitPivotalTrackerIntegration::Util::Story.select_story(@project, filter.nil? ? 'release' : filter, 1)
37
+ story = GitPivotalTrackerIntegration::Util::Story.select_release(@project, filter.nil? ? 'v' : filter)
38
38
  GitPivotalTrackerIntegration::Util::Story.pretty_print story
39
39
 
40
- updater = [
41
- GitPivotalTrackerIntegration::VersionUpdate::Gradle.new(@repository_root)
42
- ].find { |candidate| candidate.supports? }
40
+ current_branch = GitPivotalTrackerIntegration::Util::Git.branch_name
41
+
42
+ # checkout QA branch
43
+ # Update QA from origin
44
+ GitPivotalTrackerIntegration::Util::Shell.exec "git checkout QA"
45
+ GitPivotalTrackerIntegration::Util::Shell.exec "git fetch"
46
+ GitPivotalTrackerIntegration::Util::Shell.exec "git merge -s recursive --strategy-option theirs QA"
47
+
48
+ # checkout master branch
49
+ # Merge QA into master
50
+ GitPivotalTrackerIntegration::Util::Shell.exec "git checkout master"
51
+ GitPivotalTrackerIntegration::Util::Shell.exec "git fetch"
52
+ if (GitPivotalTrackerIntegration::Util::Shell.exec "git merge -s recursive --strategy-option theirs master")
53
+ puts "Merged 'QA' in to 'master'"
54
+ else
55
+ abort "FAILED to merge 'QA' in to 'master'"
56
+ end
57
+
58
+ # Update version and build numbers
59
+ version_number = story.name.dup
60
+ version_number[0] = ""
61
+ puts "storyNAME:#{story.name}"
62
+ puts "version_number:#{version_number}"
63
+ project_directory = ((GitPivotalTrackerIntegration::Util::Shell.exec 'find . -name "*.xcodeproj" 2>/dev/null').split /\/(?=[^\/]*$)/)[0]
64
+ working_directory = (GitPivotalTrackerIntegration::Util::Shell.exec "pwd").chop
65
+ puts "working_directory:#{working_directory}*"
66
+
67
+ # cd to the project_directory
68
+ Dir.chdir(project_directory)
69
+
70
+ # set project number in project file
71
+ GitPivotalTrackerIntegration::Util::Shell.exec "pwd"
72
+ puts GitPivotalTrackerIntegration::Util::Shell.exec "xcrun agvtool new-marketing-version #{version_number}"
73
+
74
+ # cd back to the working_directory
75
+ Dir.chdir(working_directory)
76
+
77
+ # Create a new build commit, push to QA, checkout develop
78
+ GitPivotalTrackerIntegration::Util::Git.create_commit( "Update build number to #{version_number} for delivery to QA", story)
79
+ puts GitPivotalTrackerIntegration::Util::Shell.exec "git push"
80
+ puts GitPivotalTrackerIntegration::Util::Shell.exec "git checkout #{current_branch}"
43
81
 
44
- current_version = updater.current_version
45
- release_version = ask("Enter release version (current: #{current_version}): ")
46
- next_version = ask("Enter next development version (current: #{current_version}): ")
47
82
 
48
- updater.update_version release_version
49
- GitPivotalTrackerIntegration::Util::Git.create_release_tag release_version, story
50
- updater.update_version next_version
51
- GitPivotalTrackerIntegration::Util::Git.create_commit "#{next_version} Development", story
52
83
 
53
- GitPivotalTrackerIntegration::Util::Git.push GitPivotalTrackerIntegration::Util::Git.branch_name, "v#{release_version}"
54
84
  end
55
85
 
86
+
87
+
56
88
  end
@@ -126,6 +126,7 @@ class GitPivotalTrackerIntegration::Util::Story
126
126
  # only include stories that have been estimated
127
127
  estimated_candidates = Array.new
128
128
  val_is_valid = true
129
+
129
130
  candidates.each {|val|
130
131
  val_is_valid = true
131
132
  if (val.story_type == "feature" )
@@ -135,7 +136,11 @@ class GitPivotalTrackerIntegration::Util::Story
135
136
  val_is_valid = false
136
137
  end
137
138
  elsif (val.story_type == "release")
138
- if (val.name[0] != release_type)
139
+ label_string = val.labels
140
+ if label_string.nil?
141
+ label_string = "";
142
+ end
143
+ if (val.name[0] != release_type) || (label_string.include? val.name)
139
144
  val_is_valid = false
140
145
  end
141
146
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: v2gpti
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.4
4
+ version: 0.2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Hale
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-23 00:00:00.000000000 Z
12
+ date: 2014-05-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline