@@ -22,83 +22,62 @@ child() {
2222 cpid=" "
2323 ret=0
2424 i=0
25-
2625 echo " + Spawning $# childs ..."
27-
2826 for c in " $@ " ; do
2927 ( (( (((eval "$c "; echo $? >& 3 ) | sed "s/ ^/ \|------ ($i ) / " >& 4 ) 2 >& 1 | sed "s/ ^/ \|------ ($i )!/ " >& 2 ) 3 >& 1 ) | (read xs; exit $xs )) 4>&1 ) & ppid=$!
30-
3128 cpid=" $cpid $ppid "
32-
3329 echo " + Child $i (PID $ppid ): $c ..."
34-
3530 i=$(( i+ 1 ))
3631 done
37-
3832 for c in $cpid ; do
3933 wait $c
40-
4134 cret=$?
4235 [ $cret -eq 0 ] && continue
43-
4436 echo " * Child PID $c has failed." >&2
45-
4637 ret=$cret
4738 done
48-
4939 return $ret
5040}
5141
5242retry () {
5343 res=0
54-
5544 for i in $( seq 0 36) ; do
5645 $@
5746 res=$?
58-
5947 [ $res -eq 0 ] && return $res || sleep 10
6048 done
61-
6249 return $res
6350}
6451
6552catch () {
6653 (eval ' "$@"' )
6754 res=$?
68-
6955 [ $res -eq 0 ] && return $res
70-
7156 echo " Command \" $@ \" has failed. Exit code: $res "
72-
7357 exit $res
7458}
7559
7660SSHWIFTY_LAST_TAG_NAME=HEAD~1
7761
7862if [ " $SSHWIFTY_DEPLOY " = ' yes' ]; then
7963 echo ' Downloading compile & deploy tools ...'
80-
8164 [ " $( which ghr) " != ' ' ] || catch retry go install -v github.com/tcnksm/ghr@latest
8265 [ " $( which gox) " != ' ' ] || catch retry go install -v github.com/mitchellh/gox@latest
83-
8466 echo ' Fetching extra references from the repository ...'
85-
8667 GIT_TAG_FETCH_PARAM=
87-
8868 if [ " $( git rev-parse --is-shallow-repository) " ]; then
8969 echo ' Shallow clone detected, will unshallow ...'
90-
9170 GIT_TAG_FETCH_PARAM=' --unshallow'
9271 fi
93-
9472 catch retry git fetch --tags " $GIT_TAG_FETCH_PARAM "
95-
9673 SSHWIFTY_LAST_TAG_NAME=$( git describe --tags --abbrev=0 --always HEAD~1)
9774fi
9875
9976echo " Version: $SSHWIFTY_VERSION "
10077echo " Files: $( pwd) " && ls -la
101- export
78+ echo " Golang: $( go version) "
79+ echo " NPM: $( npm version) "
80+ export | grep -i " SSHWIFTY"
10281git status --short
10382git log --pretty=format:" - %h %s - (%an) %GK %G?" " $SSHWIFTY_LAST_TAG_NAME " ..HEAD
10483
0 commit comments