-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-test.sh
More file actions
49 lines (39 loc) · 830 Bytes
/
docker-test.sh
File metadata and controls
49 lines (39 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#
# example of how to run this tests using docker image
#
#
container=TOML_UNION
IMAGE=pasaopasen/toml-union
target=./tmp/out
#
# remove previous container
#
docker container rm ${container} 2> /dev/null || true
#
# mount and run
#
docker run -it --name ${container} \
-v "$(pwd)"/input:/toml_union/input \
${IMAGE} \
python toml_union.py ./input -o /out/output.toml -r /out/report.json \
-k tool.poetry.name=union \
-k tool.poetry.version=12
#
# remove previous output
#
rm -rf $target
#
# extract output
#
mkdir -p "$(dirname "$target")"
docker cp ${container}:/out $target
echo "Results in ${target}:"
ls -lah $target
echo -e '\n\n'
report=${target}/report.json
if [ -f "${report}" ]
then
echo there r some toml conflicts, take a look at file ${report}
else
echo no conflicts
fi