prima-twig 0.48.7 → 0.48.8
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.
- checksums.yaml +4 -4
- data/bin/twig-feature +11 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48e1757f955bcc07440b82685c1244109f6ef7384f805e5e59bda39188e6f1ca
|
4
|
+
data.tar.gz: c44d495d6249c72283304fcf92dd71011d74613c66b68df4f138afef83fdee46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c37c9afb1de5a8909b18873af2b1562298a2164991edae996c72018974a6e57f6f9470e1818d835861b6a6803dea45a69775c4f910ef7450ff324bd283c12e5
|
7
|
+
data.tar.gz: f849e254b2fa767b1380d3c1a80f38fe4c585642ec10043a49607e284cb6aadb469dbf24b290c2d84413a03fd324695040c942ff43bfcb8ae1e97a25260b0dca
|
data/bin/twig-feature
CHANGED
@@ -457,10 +457,13 @@ class Release
|
|
457
457
|
end
|
458
458
|
end
|
459
459
|
|
460
|
+
def get_git_user()
|
461
|
+
`git config user.name`.gsub(/[^A-Za-z]/, '').gsub("\n", '')
|
462
|
+
end
|
463
|
+
|
460
464
|
def qainit_deploy!(quiet = false)
|
461
465
|
`git checkout master && git pull && git remote prune origin`
|
462
466
|
|
463
|
-
git_user = `git config user.name`.gsub(/[^A-Za-z]/, '').gsub("\n", '')
|
464
467
|
default_name = get_default_branch_name @projects
|
465
468
|
feature_number = ''
|
466
469
|
unless quiet
|
@@ -468,7 +471,7 @@ class Release
|
|
468
471
|
feature_number = String(STDIN.gets.chomp)
|
469
472
|
end
|
470
473
|
feature_number = default_name if feature_number.empty?
|
471
|
-
branch_name =
|
474
|
+
branch_name = get_git_user + '_' + feature_number
|
472
475
|
|
473
476
|
if `git branch -l | grep #{branch_name}`.size > 0
|
474
477
|
`git checkout #{branch_name} && git pull`
|
@@ -529,13 +532,15 @@ class Release
|
|
529
532
|
`git fetch -p && for branch in \`git branch -vv | grep ': gone]' | awk '{print $1}'\`; do git branch -D $branch; done`
|
530
533
|
# leggiamo i nomi dei branch superstiti
|
531
534
|
former_branches = `git branch -a | grep remotes/ | grep -v HEAD | sed 's/ remotes\\/origin\\///g'`.split "\n"
|
535
|
+
git_user = get_git_user
|
532
536
|
# stampiamo la lista
|
533
537
|
chosen_branch = choose do |menu|
|
534
538
|
menu.prompt = "Scegli il QA che vuoi aggiornare: ".cyan
|
535
539
|
menu.shell = true
|
536
540
|
former_branches.delete('master')
|
537
541
|
former_branches.each_with_index do |branch, index|
|
538
|
-
msg = index.odd? ? branch.white
|
542
|
+
msg = index.odd? ? branch.white : branch.light_yellow # uno bianco e uno giallo alternati
|
543
|
+
msg = branch.start_with?(git_user) ? msg.on_blue : msg.on_black # i branch creati da chi lancia l'update sono su sfondo più chiaro
|
539
544
|
menu.choice(msg) { branch }
|
540
545
|
end
|
541
546
|
end
|
@@ -580,9 +585,11 @@ class Release
|
|
580
585
|
chosen_branch = choose do |menu|
|
581
586
|
menu.prompt = "Scegli il QA che vuoi spegnere: ".cyan
|
582
587
|
menu.shell = true
|
588
|
+
git_user = get_git_user
|
583
589
|
former_branches.delete('master')
|
584
590
|
former_branches.each_with_index do |branch, index|
|
585
|
-
msg = index.odd? ? branch.white
|
591
|
+
msg = index.odd? ? branch.white : branch.light_yellow # uno bianco e uno giallo alternati
|
592
|
+
msg = branch.start_with?(git_user) ? msg.on_blue : msg.on_black # i branch creati da chi lancia l'update sono su sfondo blu
|
586
593
|
menu.choice(msg) { branch }
|
587
594
|
end
|
588
595
|
end
|