hu 1.5.8 → 1.5.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hu/deploy.rb +27 -10
  3. data/lib/hu/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 358bbb241425ed3c184ebdf6f0fe683ac0d1fe08
4
- data.tar.gz: a523418c8088a1cf643336f746fb6ff40e6d8bdc
3
+ metadata.gz: b36267378bd4d1ee0f9168d90597d93b7bf6a4da
4
+ data.tar.gz: ce2a525e407c063c3436499cebd550ae4c8067e5
5
5
  SHA512:
6
- metadata.gz: 535a03abc1333d78340e96213109cb099c5aaafa044216fe0fbe735fbc4239ff66558a8772810e054e800de7e539acebc8434d922b8dc57028483657006805be
7
- data.tar.gz: 95ba5d9c80df2b7f89fcae44e2b4e1112932fcee816a0e6a3e3008dc0e52e5045616e710a5c2ec9ac819d030a774ec49653dcbd05bb6c665f360ee7a56c6a78c
6
+ metadata.gz: 363b6dbe20b3208e4fe693323043acd898aff30ff105c3e7d70e885ecdcf3dee90159c75a5571e3fe6289eaaae00852af73017398317fe3edc4446ee37fb8f02
7
+ data.tar.gz: afbe9587820fee4275c98e56f52e12459e755882593029e2f7d0de90482d17726e534410449e664a5b9f0fb235390ccaf382ccaf24103784db8a3aa957c23a8f
@@ -7,6 +7,12 @@ module Hu
7
7
  ::TTY::Formats::FORMATS[:hu] = { frames: '🌑🌒🌓🌔🌕🌖🌗🌘'.chars, interval: 10 }
8
8
  ::TTY::Formats::FORMATS[:huroku] = { frames: '⣷⣯⣟⡿⢿⣻⣽⣾'.chars, interval: 10 }
9
9
 
10
+ RELEASE_TYPE_HINT = {
11
+ 'patch' => 'only bugfixes',
12
+ 'minor' => 'new features, fully backwards compatible',
13
+ 'major' => 'not backwards compatible'
14
+ }
15
+
10
16
  $stdout.sync
11
17
  @@shutting_down = false
12
18
  @@spinner = nil
@@ -213,8 +219,17 @@ module Hu
213
219
  changelog = 'Initial revision'
214
220
  release_branch_exists = branch_exists?("release/#{release_tag}")
215
221
 
222
+ case release_tag
223
+ when minor_bump
224
+ release_type = 'minor'
225
+ when major_bump
226
+ release_type = 'major'
227
+ else
228
+ release_type = 'patch'
229
+ end
230
+
216
231
  if release_branch_exists
217
- puts "\nThis release will be " + release_tag.color(:green).bright
232
+ puts "\nThis will be "+"#{release_type} release ".bright+release_tag.color(:green).bright
218
233
  unless highest_version == 'v0.0.0'
219
234
  env = {
220
235
  'PREVIOUS_TAG' => highest_version,
@@ -222,8 +237,8 @@ module Hu
222
237
  }
223
238
  changelog = create_changelog(env) unless highest_version == 'v0.0.0'
224
239
  unless changelog.empty?
225
- puts "\nChanges since " + highest_version.bright + ':'
226
- puts changelog
240
+ puts "\nChanges since " + highest_version.bright + " (#{RELEASE_TYPE_HINT[release_type]})".color(:black).bright
241
+ puts changelog.color(:green)
227
242
  end
228
243
  end
229
244
  else
@@ -256,7 +271,7 @@ module Hu
256
271
  puts
257
272
  end
258
273
 
259
- choice = prompt.select('Choose your destiny') do |menu|
274
+ choice = prompt.select('>') do |menu|
260
275
  menu.enum '.'
261
276
  menu.choice 'Refresh', :refresh
262
277
  menu.choice 'Quit', :abort_ask
@@ -265,15 +280,15 @@ module Hu
265
280
  end
266
281
  if release_branch_exists
267
282
  unless release_tag == tiny_bump
268
- menu.choice "Change to PATCH release (bugfix only) : #{highest_version} -> #{tiny_bump}", :bump_tiny
283
+ menu.choice "Change to PATCH release (bugfix only) #{highest_version} -> #{tiny_bump}", :bump_tiny
269
284
  end
270
285
 
271
286
  unless release_tag == minor_bump
272
- menu.choice "Change to MINOR release (new features) : #{highest_version} -> #{minor_bump}", :bump_minor
287
+ menu.choice "Change to MINOR release (new features) #{highest_version} -> #{minor_bump}", :bump_minor
273
288
  end
274
289
 
275
290
  unless release_tag == major_bump
276
- menu.choice "Change to MAJOR release (breaking changes): #{highest_version} -> #{major_bump}", :bump_major
291
+ menu.choice "Change to MAJOR release (breaking changes) #{highest_version} -> #{major_bump}", :bump_major
277
292
  end
278
293
 
279
294
  if git_revisions[:release] == git_revisions[stag_app_name]
@@ -344,7 +359,7 @@ module Hu
344
359
  end
345
360
 
346
361
  def show_pipeline_status(pipeline_name, stag_app_name, prod_app_name, release_tag, clear = true)
347
- table = TTY::Table.new header: %w(location commit tag app_last_modified app_last_modified_by dynos# state)
362
+ table = TTY::Table.new header: ['', 'commit', 'tag', 'last_modified', 'last_modified_by', 'dynos#', '']
348
363
  busy 'synchronizing', :huroku
349
364
  ts = []
350
365
  workers = []
@@ -455,7 +470,9 @@ module Hu
455
470
  # end
456
471
 
457
472
  puts "\e[H\e[2J" if clear
458
- puts " PIPELINE #{pipeline_name} ".inverse + git_version_warning
473
+ puts " #{pipeline_name} ".bright.inverse + git_version_warning
474
+ # puts " #{pipeline_name} ".bright.inverse + ' '.color(:cyan).inverse + ' '.color(:blue).inverse + ' '.color(:black).bright.inverse + git_version_warning
475
+
459
476
  puts
460
477
 
461
478
  puts table.render(:unicode, padding: [0, 1, 0, 1], multiline: true)
@@ -470,7 +487,7 @@ module Hu
470
487
  unless missing_env.empty?
471
488
  puts
472
489
  missing_env.each do |var|
473
- puts ' WARNING '.color(:red).bright.inverse + ' Missing config in ' + prod_app_name.bright + ": #{var}"
490
+ puts ' WARNING '.background(:red).color(:yellow).bright + ' Missing config in ' + prod_app_name.bright + ": #{var}"
474
491
  sleep 0.42
475
492
  end
476
493
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hu
3
- VERSION = '1.5.8'
3
+ VERSION = '1.5.9'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.8
4
+ version: 1.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - moe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-19 00:00:00.000000000 Z
11
+ date: 2017-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler