Skip to content

Commit b505bef

Browse files
committed
Change .ci.sh to show more relevant information of the build; Change Dockerfile to build the image based on ubuntu:rolling to get relatively new software
1 parent e0b4b75 commit b505bef

2 files changed

Lines changed: 4 additions & 25 deletions

File tree

.ci.sh

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -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

5242
retry() {
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

6552
catch() {
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

7660
SSHWIFTY_LAST_TAG_NAME=HEAD~1
7761

7862
if [ "$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)
9774
fi
9875

9976
echo "Version: $SSHWIFTY_VERSION"
10077
echo "Files: $(pwd)" && ls -la
101-
export
78+
echo "Golang: $(go version)"
79+
echo "NPM: $(npm version)"
80+
export | grep -i "SSHWIFTY"
10281
git status --short
10382
git log --pretty=format:"- %h %s - (%an) %GK %G?" "$SSHWIFTY_LAST_TAG_NAME"..HEAD
10483

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the build base environment
2-
FROM ubuntu:devel AS base
2+
FROM ubuntu:rolling AS base
33
RUN set -ex && \
44
cd / && \
55
echo '#!/bin/sh' > /try.sh && echo 'res=1; for i in $(seq 0 36); do $@; res=$?; [ $res -eq 0 ] && exit $res || sleep 10; done; exit $res' >> /try.sh && chmod +x /try.sh && \

0 commit comments

Comments
 (0)