forked from yatiml/yatiml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_ruamel_yaml_versions.sh
executable file
·61 lines (48 loc) · 1.39 KB
/
test_ruamel_yaml_versions.sh
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
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
# To use this:
# - modify the seq commands in the for loops to select the versions to test
# - create and activate a venv
# - run the script from the root directory
# It will test all the selected versions, and print an overview of which worked
# and which didn't.
# Note that it modifies setup.py, so you'll want to restore that afterwards.
# Tip: $(seq 1 0) gives an empty list
# Currently supported:
# 0.15.71 -> 0.15.100
# 0.16.0 -> 0.16.10
# Issues:
# 0.16.6 has a broken type definition
# 0.16.8 does not exist
outfile=$(mktemp)
for i in $(seq 71 1 100) ; do
sed -i "s/'ruamel.yaml[^']*'/'ruamel.yaml==0.15.$i'/" setup.py
tox -r
if (( $? != 0 )); then
echo "Version 0.15.$i: broken" >>"${outfile}"
break
else
echo "Version 0.15.$i: works" >>"${outfile}"
fi
done
for i in $(seq 10 1 13) ; do
sed -i "s/'ruamel.yaml[^']*'/'ruamel.yaml==0.16.$i'/" setup.py
tox -r
if (( $? != 0 )); then
echo "Version 0.16.$i: broken" >>"${outfile}"
# break
else
echo "Version 0.16.$i: works" >>"${outfile}"
fi
done
for i in $(seq 0 1 10) ; do
sed -i "s/'ruamel.yaml[^']*'/'ruamel.yaml==0.17.$i'/" setup.py
tox -r
if (( $? != 0 )); then
echo "Version 0.17.$i: broken" >>"${outfile}"
# break
else
echo "Version 0.17.$i: works" >>"${outfile}"
fi
done
cat "${outfile}"
rm "${outfile}"