allegro_release 0.1.6 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21cd14882704d7d59db9e50860adadb65c617268
4
- data.tar.gz: 634e64b48221019aab86036997a29910cc68922f
3
+ metadata.gz: 108219e4e653df3cd90bf18e551899b0ae7a47f1
4
+ data.tar.gz: ddcc1f84bad92b8bbb2c985cbc0e2ba2ee175a1c
5
5
  SHA512:
6
- metadata.gz: e1c730b3051c8a4094a4ae384472b4e4bb15cc67bf4cb94b0f958a0724f60f7a05cfe62628bc0dbdb5162de52c28210da668bd0b7784c9abc1d72033d78d30b7
7
- data.tar.gz: 4fd502a9e25f6db3d808c9058335753ba156e8ec83535e6a61d34249d72c985db757ff54687fb8a585bfbb29f1ce5f8770df63f1e0c4c3de038b25615d7d7a4f
6
+ metadata.gz: 397015df10ceb48d6afa454457f190d96f48606970e09e01b564c11255331471341648cf24b906b80c2274b25af89ad3e1397f21eaca97da814e37091db160ed
7
+ data.tar.gz: b5f0ade03a232bf075f6a13508baa10e1cbffdb7e0225ee84dc83ab1a7e7d37160505dfdbc25faf406de1ac58dbd3e78b5ddd8254a518076d969a798cca02425
data/exe/allegro_release CHANGED
@@ -10,7 +10,7 @@ Releases a private pod.
10
10
  Procedure - https://stash.allegrogroup.com/projects/IOSTOOLS/repos/pods.specs/browse.
11
11
 
12
12
  Usage:
13
- allegro_release current # shows current version
13
+ allegro_release current # shows current version of .podspec file
14
14
  allegro_release patch # bumps patch version (1.0.X) and performs step 1 of procedure
15
15
  allegro_release minor # bumps minor version (1.X.0) and performs step 1 of procedure
16
16
  allegro_release major # bumps major version (X.0.0) and performs step 1 of procedure
@@ -1,3 +1,3 @@
1
1
  module AllegroRelease
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
@@ -50,7 +50,7 @@ module AllegroRelease
50
50
  def self.add_tag
51
51
  puts "Adding tag #{version_from_file} and pushing to origin.".colorize(:green)
52
52
  system_cmd("git tag #{version_from_file}")
53
- system_cmd("git push origin --tags")
53
+ system_cmd("git push origin #{version_from_file}")
54
54
  end
55
55
 
56
56
  def self.push_to_spec_repository
@@ -59,11 +59,17 @@ module AllegroRelease
59
59
  end
60
60
 
61
61
  def self.to_master
62
+ create_local_master
62
63
  checkout_release
63
64
  create_pull_request_to_master
64
65
  puts "Second step is done! Now head to HipChat and paste the content of clipboard that contains link to pull request. After manual merge perform `allegro_release finish`.".colorize(:green)
65
66
  end
66
67
 
68
+ def self.create_local_master
69
+ puts "Fetching master and creating local master branch if not already present.".colorize(:green)
70
+ system_cmd("git fetch origin master:master")
71
+ end
72
+
67
73
  def self.create_pull_request_to_master
68
74
  puts "Creating pull request to master on Stash.".colorize(:green)
69
75
  pull_request_command = "stash pull-request master -T \"Release #{version_from_file}.\" -d \"Release #{version_from_file}.\""
@@ -93,11 +99,13 @@ module AllegroRelease
93
99
  def self.perform_pull_request(pull_request_command)
94
100
  link = `#{pull_request_command}`
95
101
  if link.include? 'Authentication failed. Please check your credentials and try again.'
96
- expired_credentials = "Your Stash credentials expired (probably due to monthly password change). Below you can find instruction what values to enter. Authorizing again. \n".colorize(:red)
97
- tip_one = "Bitbucket Server Username: <your_username> (go to \"View Profile\" in upper-right corner of Stash)\n".colorize(:green)
98
- tip_two = "Bitbucket Server Password (optional): <your_password>\n".colorize(:green)
99
- tip_three = "Bitbucket Server URL: https://stash.allegrogroup.com/\n".colorize(:green)
100
- puts expired_credentials + tip_one + tip_two + tip_three
102
+ expired_credentials = "Your Stash credentials expired (probably due to monthly password change). Below you can find instruction about what values to enter. Authorizing again. \n".colorize(:red)
103
+ tip_one = "1. Bitbucket Server Username: <your_username> (go to \"View Profile\" in upper-right corner of Stash)\n".colorize(:blue)
104
+ tip_two = "2. Bitbucket Server Password (optional): <your_password>\n".colorize(:blue)
105
+ tip_three = "3. Bitbucket Server URL: https://stash.allegrogroup.com/\n".colorize(:blue)
106
+ tip_four = "4. Remote (optional): (just press enter)\n".colorize(:blue)
107
+ tip_five = "5. Create a git alias 'git create-pull-request'?: n\n".colorize(:blue)
108
+ puts expired_credentials + tip_one + tip_two + tip_three + tip_four + tip_five
101
109
  system_cmd("stash configure")
102
110
  link = `#{pull_request_command}`
103
111
  end
@@ -111,7 +119,7 @@ module AllegroRelease
111
119
 
112
120
  def self.commit_release(version)
113
121
  cli = HighLine.new
114
- jira_id = cli.ask("Give JIRA issue ID to commit changes (e.g. IOSBUYERS-1234 or ICETIOS-368): ".colorize(:yellow)) { |q| q.validate = /\A[A-Z]+-\d+\z/ }
122
+ jira_id = cli.ask("Give JIRA issue ID to commit changes (e.g. IOSBUY-264 or ICETIOS-368): ".colorize(:yellow)) { |q| q.validate = /\A[A-Z]+-\d+\z/ }
115
123
  commit(jira_id, version)
116
124
  end
117
125
 
@@ -161,10 +169,9 @@ module AllegroRelease
161
169
 
162
170
  def self.checkout_release
163
171
  return unless File.directory?(".git")
164
- puts "Pulling release_#{version_from_file} branch.".colorize(:green)
172
+ puts "Pulling & checking out release_#{version_from_file} branch.".colorize(:green)
165
173
  system_cmd("git checkout release_#{version_from_file}")
166
174
  system_cmd("git pull")
167
- puts "Checking out release_#{version_from_file} branch.".colorize(:green)
168
175
  end
169
176
 
170
177
  def self.commit(jira_id, version)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allegro_release
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksander Grzyb
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-19 00:00:00.000000000 Z
11
+ date: 2016-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  requirements: []
133
133
  rubyforge_project:
134
- rubygems_version: 2.4.8
134
+ rubygems_version: 2.6.2
135
135
  signing_key:
136
136
  specification_version: 4
137
137
  summary: A command line tools to release module.