allegro_release 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/allegro_release +1 -1
- data/lib/allegro_release/version.rb +1 -1
- data/lib/allegro_release.rb +16 -9
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 108219e4e653df3cd90bf18e551899b0ae7a47f1
|
4
|
+
data.tar.gz: ddcc1f84bad92b8bbb2c985cbc0e2ba2ee175a1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/allegro_release.rb
CHANGED
@@ -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
|
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(:
|
98
|
-
tip_two = "Bitbucket Server Password (optional): <your_password>\n".colorize(:
|
99
|
-
tip_three = "Bitbucket Server URL: https://stash.allegrogroup.com/\n".colorize(:
|
100
|
-
|
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.
|
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.
|
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-
|
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.
|
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.
|