prima-twig 0.36.71 → 0.36.72

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/twig-feature +28 -14
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cb596d68ce96531baa1721e0866ad4f57639ae9
4
- data.tar.gz: 0fae67f256bc4a81763296043e2159712b485ea5
3
+ metadata.gz: 60305cedb3eb7958383dccb61996284caead3135
4
+ data.tar.gz: 3eebc2d6ed79963840dc1afd1ff4017d422b3f7d
5
5
  SHA512:
6
- metadata.gz: 72ad55b61a19fbff9cc81d28a544c07a6433bd61f38164b5d6ccc42ef6f562e716076ed0592ba4505d7dace4bff1aa3d7e2a07819c978e9e048533a389d9b63b
7
- data.tar.gz: ae951fd7b725f4db1d444e64ed619d2749518934fcd90e85f0c6e0c2df1a8c4964187056881d2188486712742d6029cd28cde5e57700c5f4e76e8bcdd1f7c805
6
+ metadata.gz: 4185696e82faf363b49914ba296a06e462585983df93fbcf15ccd0b96d95acd1d92aab29191d00768d5bc7b71b3b124dd633ebc36e10f3ad227a4a9d596472c0
7
+ data.tar.gz: 0435b6d8cfcb9b2b9b88958562a47c1288802c39207f7c16ade0885b966a45fc1608f71d19c2e3708d881d5e596a9b84ac8a366c153e1f4f82baf158c28f13ae
data/bin/twig-feature CHANGED
@@ -62,9 +62,9 @@ class Release
62
62
  when 'qainit'
63
63
  abort('Non sei nella cartella di qainit') unless Dir.pwd.match 'qainit$'
64
64
  if ['terminate', 'stop', 'shutdown', 'halt', 'destroy'].include? args[1]
65
- qainit_deploy_update! 'shutdown'
65
+ qainit_deploy_shutdown!
66
66
  elsif 'update' == args[1]
67
- qainit_deploy_update! 'update'
67
+ qainit_deploy_update!
68
68
  elsif 'read' == args[1]
69
69
  qainit_read_config!
70
70
  else
@@ -415,11 +415,10 @@ class Release
415
415
  end
416
416
 
417
417
  def qainit_deploy!
418
- output 'Inserisci la feature a cui si riferisce il QA: '
418
+ `git checkout master && git pull && git remote prune origin`
419
+ output 'Inserisci la feature a cui si riferisce il QA: '.cyan
419
420
  feature_number = String(STDIN.gets.chomp)
420
421
 
421
- `git checkout master`
422
-
423
422
  if `git branch -l | grep #{feature_number}`.size > 0
424
423
  `git checkout #{feature_number} && git pull`
425
424
  else
@@ -443,24 +442,20 @@ class Release
443
442
  git checkout master`
444
443
  end
445
444
 
446
- def qainit_deploy_update!(action)
445
+ def qainit_deploy_update!
446
+ `git checkout master && git pull && git remote prune origin`
447
447
  # leggiamo i nomi dei branch
448
448
  former_branches = `git branch -a | grep remotes/ | grep -v HEAD | sed 's/ remotes\\/origin\\///g'`.split "\n"
449
449
  # stampiamo la lista
450
450
  chosen_branch = choose do |menu|
451
- case action
452
- when "update"
453
- menu.prompt = "Scegli il QA che vuoi aggiornare: ".cyan
454
- when "shutdown"
455
- menu.prompt = "Scegli il QA che vuoi spegnere: ".cyan
456
- end
451
+ menu.prompt = "Scegli il QA che vuoi aggiornare: ".cyan
457
452
  menu.shell = true
458
453
  former_branches.each do |branch|
459
454
  msg = branch.light_blue
460
455
  menu.choice(msg) { branch }
461
456
  end
462
457
  end
463
- # checkout master, checkout branch, pull branch, push sul branch con commit vuoto
458
+ # checkout master, checkout branch, pull branch
464
459
  `git checkout master && git checkout #{chosen_branch} && git pull`
465
460
 
466
461
  # aggiornare il commit (revision a cui fa riferimento)
@@ -484,7 +479,26 @@ class Release
484
479
 
485
480
  File.open('branch_names', 'w') { |file| file.write(branches) }
486
481
 
487
- `git commit -am '#{action}' && git push && git checkout master`
482
+ `git commit -am 'update' && git push && git checkout master`
483
+ end
484
+
485
+ def qainit_deploy_shutdown!
486
+ `git checkout master && git pull && git remote prune origin`
487
+ # leggiamo i nomi dei branch
488
+ former_branches = `git branch -a | grep remotes/ | grep -v HEAD | sed 's/ remotes\\/origin\\///g'`.split "\n"
489
+ # stampiamo la lista
490
+ chosen_branch = choose do |menu|
491
+ case action
492
+ menu.prompt = "Scegli il QA che vuoi spegnere: ".cyan
493
+ menu.shell = true
494
+ former_branches.each do |branch|
495
+ msg = branch.light_blue
496
+ menu.choice(msg) { branch }
497
+ end
498
+ end
499
+ # checkout master, checkout branch, pull branch, push sul branch con commit vuoto
500
+ `git checkout master && git checkout #{chosen_branch} && git pull`
501
+ `git commit --allow-empty 'shutdown' && git push && git checkout master`
488
502
  end
489
503
 
490
504
  def qainit_read_config!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prima-twig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.36.71
4
+ version: 0.36.72
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Giachino
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2018-06-08 00:00:00.000000000 Z
16
+ date: 2018-06-12 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: aws-sdk