hu 1.5.10 → 1.5.11

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 -20
  3. data/lib/hu/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 474c3c14d09f082839d770456bb8cce5f4142596
4
- data.tar.gz: 5d9979a535bab63f1424e7e102c633df8cd75b89
3
+ metadata.gz: 96baaa904903f82d9d5f2d4cc918746044c9ba08
4
+ data.tar.gz: c6cabff7673f6b19fc6e3c0fff0716afc2dd2c0b
5
5
  SHA512:
6
- metadata.gz: 4e546e761a5fb799ec276d67498c9900ed4fc41b9f90a76945d777adadc094126c65beabc3ad80f749cff156a83882200f69f6a7d18a21826df39d400686b096
7
- data.tar.gz: fce2e71527387448f9b8e990dc84a5e4207b62bbeca5ef26767c7cf39e89efc4488868aa7edf6beb7ffa63e6e7d1b67721e9536104a98c3d52fa70f5ccd060bd
6
+ metadata.gz: ccef6f36d02ef9fa6029cd4438e705970415c987bb744815ce76194243f2fc973d67b109b1cc5bfb70e92bc409ffd8299ed98eef590ff89d645d08441355eb61
7
+ data.tar.gz: 2f9db5a1f8486253870d6c3efcfc9f28c869df5432f59a49bd2ef01fbe095c90092990da94b07dab5d44102d0e0cf063b0a991b629dc989b477d7b0f664638ad
data/lib/hu/deploy.rb CHANGED
@@ -271,32 +271,37 @@ module Hu
271
271
  puts
272
272
  end
273
273
 
274
- choice = prompt.select('>') do |menu|
275
- menu.enum '.'
276
- menu.choice 'Refresh', :refresh
277
- menu.choice 'Quit', :abort_ask
278
- unless git_revisions[:release] == git_revisions[stag_app_name] || !release_branch_exists
279
- menu.choice "Push release/#{release_tag} to #{stag_app_name}", :push_to_staging
280
- end
281
- if release_branch_exists
282
- unless release_tag == tiny_bump
283
- menu.choice "Change to PATCH release (bugfix only) #{highest_version} -> #{tiny_bump}", :bump_tiny
274
+ begin
275
+ choice = prompt.select('>') do |menu|
276
+ menu.enum '.'
277
+ menu.choice 'Refresh', :refresh
278
+ menu.choice 'Quit', :abort_ask
279
+ unless git_revisions[:release] == git_revisions[stag_app_name] || !release_branch_exists
280
+ menu.choice "Push release/#{release_tag} to #{stag_app_name}", :push_to_staging
284
281
  end
282
+ if release_branch_exists
283
+ unless release_tag == tiny_bump
284
+ menu.choice "Change to PATCH release (bugfix only) #{highest_version} -> #{tiny_bump}", :bump_tiny
285
+ end
285
286
 
286
- unless release_tag == minor_bump
287
- menu.choice "Change to MINOR release (new features) #{highest_version} -> #{minor_bump}", :bump_minor
288
- end
287
+ unless release_tag == minor_bump
288
+ menu.choice "Change to MINOR release (new features) #{highest_version} -> #{minor_bump}", :bump_minor
289
+ end
289
290
 
290
- unless release_tag == major_bump
291
- menu.choice "Change to MAJOR release (breaking changes) #{highest_version} -> #{major_bump}", :bump_major
292
- end
291
+ unless release_tag == major_bump
292
+ menu.choice "Change to MAJOR release (breaking changes) #{highest_version} -> #{major_bump}", :bump_major
293
+ end
293
294
 
294
- if git_revisions[:release] == git_revisions[stag_app_name]
295
- menu.choice 'Finish release (merge, tag and final stage)', :finish_release
295
+ if git_revisions[:release] == git_revisions[stag_app_name]
296
+ menu.choice 'Finish release (merge, tag and final stage)', :finish_release
297
+ end
298
+ elsif git_revisions[prod_app_name] != git_revisions[stag_app_name]
299
+ menu.choice "DEPLOY (promote #{stag_app_name} to #{prod_app_name})", :DEPLOY
296
300
  end
297
- elsif git_revisions[prod_app_name] != git_revisions[stag_app_name]
298
- menu.choice "DEPLOY (promote #{stag_app_name} to #{prod_app_name})", :DEPLOY
299
301
  end
302
+ rescue TTY::Prompt::Reader::InputInterrupt
303
+ choice = :abort
304
+ puts "\n\n"
300
305
  end
301
306
 
302
307
  case choice
@@ -354,6 +359,8 @@ module Hu
354
359
  end
355
360
  when :refresh
356
361
  puts
362
+ when :abort
363
+ exit 0
357
364
  end
358
365
  end
359
366
  end
data/lib/hu/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hu
3
- VERSION = '1.5.10'
3
+ VERSION = '1.5.11'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.10
4
+ version: 1.5.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - moe