File tree Expand file tree Collapse file tree 2 files changed +20
-21
lines changed Expand file tree Collapse file tree 2 files changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -27,21 +27,7 @@ for version in "${versions[@]}"; do
27
27
fi
28
28
info " Build of $tag succeeded."
29
29
30
- OUTPUT=$( docker run --rm -it node:" $tag " node -e " process.stdout.write(process.versions.node)" )
31
- if [ " $OUTPUT " != " $full_version " ]; then
32
- fatal " Test of $tag for node failed!"
33
- fi
34
- info " Test of $tag for node succeeded."
35
-
36
- if ! docker run --rm -i node:" $tag " npm --version; then
37
- fatal " Test of $tag for npm failed!"
38
- fi
39
- info " Test of $tag for npm succeeded."
40
-
41
- if ! docker run --rm -i node:" $tag " yarn --version; then
42
- fatal " Test of $tag for yarn failed!"
43
- fi
44
- info " Test of $tag for yarn succeeded."
30
+ docker run --rm -v " $PWD /test-image.sh:/usr/local/bin/test.sh" node:" $tag " test.sh " $full_version "
45
31
46
32
# Get supported variants according to the target architecture.
47
33
# See details in function.sh
@@ -58,12 +44,7 @@ for version in "${versions[@]}"; do
58
44
fi
59
45
info " Build of $tag -$variant succeeded."
60
46
61
- OUTPUT=$( docker run --rm -it node:" $tag -$variant " node -e " process.stdout.write(process.versions.node)" )
62
- if [ " $OUTPUT " != " $full_version " ]; then
63
- fatal " Test of $tag -$variant failed!"
64
- fi
65
- info " Test of $tag -$variant succeeded."
66
-
47
+ docker run --rm -v " $PWD /test-image.sh:/usr/local/bin/test.sh" node:" $tag -$variant " test.sh " $full_version "
67
48
done
68
49
69
50
done
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ if [ " $( node -e " process.stdout.write(process.versions.node)" ) " != " $1 " ]; then
3
+ echo " Test for node failed!"
4
+ exit 1
5
+ fi
6
+ echo " Test for node succeeded."
7
+
8
+ if ! npm --version > /dev/null; then
9
+ echo " Test for npm failed!"
10
+ exit 2
11
+ fi
12
+ echo " Test for npm succeeded."
13
+
14
+ if ! yarn --version > /dev/null; then
15
+ echo " Test of yarn failed!"
16
+ exit 3
17
+ fi
18
+ echo " Test for yarn succeeded."
You can’t perform that action at this time.
0 commit comments