prima-twig 0.47.4 → 0.47.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/bin/twig-feature +39 -12
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8b9828a9f293d85a935cb1aa7679be5ceb48ab06
|
4
|
+
data.tar.gz: d872163a4439fed79edbe3a27cb76bf0e18510a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c990eb9901ad616719a6eb54521a4b78d6a152f4a7692368e1128ee78cd5221078a0aae28dc1964ac5c915b9686f0f2971f549bab74415d4ce8894798c7a3df
|
7
|
+
data.tar.gz: 881997a72c042088dcf7462010f573bb82984725ac563706e7aa040c4bbb8b213c4fe201a7d81dc4be9993044579f9954f730f4eb446f444393fd59ccafd62c8
|
data/bin/twig-feature
CHANGED
@@ -83,6 +83,14 @@ class Release
|
|
83
83
|
end
|
84
84
|
qainit_deploy!
|
85
85
|
end
|
86
|
+
when 'suite'
|
87
|
+
abort('Non sei nella cartella di qainit') unless Dir.pwd.match 'qainit$'
|
88
|
+
if 'deploy' == args[1]
|
89
|
+
suite_py_branches(args[2])
|
90
|
+
qainit_deploy!(true)
|
91
|
+
else
|
92
|
+
qainit_deploy_shutdown!(args[2])
|
93
|
+
end
|
86
94
|
when 'deploy'
|
87
95
|
abort('Non sei nella cartella di artemide') unless Dir.pwd.match 'artemide$'
|
88
96
|
if ['terminate', 'stop', 'shutdown', 'halt', 'destroy'].include? args[1]
|
@@ -436,13 +444,28 @@ class Release
|
|
436
444
|
end
|
437
445
|
end
|
438
446
|
|
439
|
-
def
|
447
|
+
def suite_py_branches(args_json)
|
448
|
+
args = JSON.parse(args_json)
|
449
|
+
|
450
|
+
args['projects'].each_key do |project|
|
451
|
+
@projects[project] = { name: args['projects'][project]['branch'], revision: args['projects'][project]['revision'], committer: '', default_branch: false }
|
452
|
+
end
|
453
|
+
|
454
|
+
@projects.each_key do |project|
|
455
|
+
@projects[project] = choose_branch_to_deploy(project, true) unless args['projects'].key? project
|
456
|
+
end
|
457
|
+
end
|
458
|
+
|
459
|
+
def qainit_deploy!(quiet = false)
|
440
460
|
`git checkout master && git pull && git remote prune origin`
|
441
461
|
|
442
462
|
git_user = `git config user.name`.gsub(/[^A-Za-z]/, '').gsub("\n", '')
|
443
463
|
default_name = get_default_branch_name @projects
|
444
|
-
|
445
|
-
|
464
|
+
feature_number = ''
|
465
|
+
unless quiet
|
466
|
+
output "Inserisci la feature a cui si riferisce il QA: [#{default_name}]".cyan
|
467
|
+
feature_number = String(STDIN.gets.chomp)
|
468
|
+
end
|
446
469
|
feature_number = default_name if feature_number.empty?
|
447
470
|
branch_name = git_user + '_' + feature_number
|
448
471
|
|
@@ -548,20 +571,24 @@ class Release
|
|
548
571
|
`git push && git checkout master`
|
549
572
|
end
|
550
573
|
|
551
|
-
def qainit_deploy_shutdown!
|
574
|
+
def qainit_deploy_shutdown!(selection = nil)
|
552
575
|
`git checkout master && git pull && git remote prune origin`
|
553
576
|
# leggiamo i nomi dei branch
|
554
577
|
former_branches = `git branch -a | grep remotes/ | grep -v HEAD | sed 's/ remotes\\/origin\\///g'`.split "\n"
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
578
|
+
if selection.nil?
|
579
|
+
# stampiamo la lista
|
580
|
+
chosen_branch = choose do |menu|
|
581
|
+
menu.prompt = "Scegli il QA che vuoi spegnere: ".cyan
|
582
|
+
menu.shell = true
|
583
|
+
former_branches.each do |branch|
|
584
|
+
unless 'master' == branch
|
585
|
+
msg = branch.light_blue
|
586
|
+
menu.choice(msg) { branch }
|
587
|
+
end
|
563
588
|
end
|
564
589
|
end
|
590
|
+
else
|
591
|
+
chosen_branch = selection
|
565
592
|
end
|
566
593
|
# checkout master, checkout branch, pull branch, push sul branch con commit vuoto
|
567
594
|
`git checkout master && git checkout #{chosen_branch} && git pull`
|
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.47.
|
4
|
+
version: 0.47.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matteo Giachino
|
@@ -214,7 +214,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '0'
|
216
216
|
requirements: []
|
217
|
-
|
217
|
+
rubyforge_project:
|
218
|
+
rubygems_version: 2.5.2.3
|
218
219
|
signing_key:
|
219
220
|
specification_version: 4
|
220
221
|
summary: The Prima twig toolbelt
|