You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# inspecting possible chilren directories for golang submodules
140
+
forsubdirin codecs providers \
141
+
lite local \
142
+
service pgsqlogger shellmode;do
143
+
[ -d$subdir ] && pub-child $subdir
144
+
done
145
+
# [ -d codecs ] && pub-child codecs
146
+
# [ -d codecs ] && pub-child providers
147
+
# # pub-child tests
148
+
# # pub-child examples
149
+
# [ -d lite ] && pub-child lite
150
+
# [ -d local ] && pub-child local
143
151
else
144
152
forsmin$which;do
145
153
forfin$(find ./$sm -type f -iname 'go.mod' -print);do
@@ -303,27 +311,41 @@ pub-child() {
303
311
# fi
304
312
305
313
if [ "$ver"="" ];then
306
-
echo"version tag not found, add doc.go and Version=\"1.0.0\" and retry."
314
+
err "version tag not found / dir = $which"
315
+
echo" add doc.go and version=\"1.0.0\" and retry."
307
316
else
308
317
ver="$(eval echo$ver)"
309
-
echo"ver=$ver found"
318
+
# echo "ver=$ver found"
319
+
tip " entering $which | using ver=$ver ..."
310
320
forsmin$which;do
311
321
forfin$(find ./$sm -type f -iname 'go.mod' -print);do
312
322
d="$(dirname "$f")"
313
323
if [ -d"$d" ];then
314
-
# do-update-dep "$d"
315
-
# commit-submodule "$d"
316
-
echo" - publishing $d"
317
-
local pre="${d/.\//}"
318
-
pushd"$d">/dev/null
319
-
if is_git_dirty;then
320
-
echo"repo is dirty, nothing to do before the changes are reviewed."
321
-
else
322
-
$ECHO git tag "$pre/$ver"
323
-
$ECHO
324
+
if [[ !"$d"==*/test ]];then
325
+
# do-update-dep "$d"
326
+
# commit-submodule "$d"
327
+
local pre="${d/.\//}"
328
+
local tag="$pre/$ver"
329
+
tip " - publishing $clr_invert$d$clr_reset_invert with tag $clr_underline$pre/$ver$clr_reset_underline."
330
+
pushd"$d">/dev/null
331
+
if is_git_dirty;then
332
+
wrn "repo is DIRTY, nothing to do before the changes are reviewed."
333
+
else
334
+
$ECHO git tag "$pre/$ver"
335
+
$ECHO
336
+
fi
337
+
popd>/dev/null
324
338
fi
325
-
popd>/dev/null
326
339
fi
340
+
341
+
# d="$(dirname "$f")"
342
+
# if [[ ! "$d" == */test ]]; then
343
+
# if [ -d "$d" ]; then
344
+
# do-update-dep "$d"
345
+
# commit-submodule "$d"
346
+
# fi
347
+
# fi
348
+
327
349
done
328
350
done
329
351
fi
@@ -587,14 +609,113 @@ is_git_dirty() {
587
609
fi
588
610
}
589
611
612
+
# effects
613
+
clr_reset_all="\e[0m"
614
+
clr_bold="\e[1m"
615
+
clr_dim="\e[2m"
616
+
clr_italic="\e[3m"
617
+
clr_underline="\e[4m"
618
+
clr_blink="\e[5m"
619
+
clr_rapic_blink="\e[6m"
620
+
clr_invert="\e[7m"
621
+
clr_hide="\e[8m"
622
+
clr_strike="\e[9m"
623
+
# reset effects
624
+
clr_reset_bold="\e[21m"
625
+
clr_reset_dim="\e[22m"
626
+
clr_reset_italic="\e[23m"
627
+
clr_reset_underline="\e[24m"
628
+
clr_reset_blink="\e[25m"
629
+
clr_reset_spacing="\e[26m"
630
+
clr_reset_invert="\e[27m"
631
+
clr_reset_hide="\e[28m"
632
+
clr_reset_crossout="\e[29m"
633
+
# 16-color fg
634
+
black='30'
635
+
red='31'
636
+
green='32'
637
+
yellow='33'
638
+
blue='34'
639
+
megenta='35'
640
+
cyan='36'
641
+
white='37'
642
+
# 16-color bright fg
643
+
bright_black='90'
644
+
bright_red='91'
645
+
bright_green='92'
646
+
bright_yellow='93'
647
+
bright_blue='94'
648
+
bright_megenta='95'
649
+
bright_cyan='96'
650
+
bright_white='97'
651
+
# 16-color bg
652
+
bg_black='40'
653
+
bg_red='41'
654
+
bg_green='42'
655
+
bg_yellow='43'
656
+
bg_blue='44'
657
+
bg_megenta='45'
658
+
bg_cyan='46'
659
+
bg_white='47'
660
+
# 16-color bright bg
661
+
bg_bright_black='100'
662
+
bg_bright_red='101'
663
+
bg_bright_green='102'
664
+
bg_bright_yellow='103'
665
+
bg_bright_blue='104'
666
+
bg_bright_megenta='105'
667
+
bg_bright_cyan='106'
668
+
bg_bright_white='107'
669
+
#
590
670
headline() { printf"\e[0;1m$@\e[0m:\n"; }
591
671
headline_begin() { printf"\e[0;1m"; } # for more color, see: shttps://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux
0 commit comments