forked from OSInside/kiwi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.obs_test_status
executable file
·31 lines (27 loc) · 994 Bytes
/
.obs_test_status
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
#!/bin/bash
function kiwi_version {
python -c 'from kiwi.version import __version__; print(__version__)'
}
function kiwi_build_version {
echo -n "$1" | grep python3-kiwi- | head -n 1 | cut -f 3 -d -
}
kiwi_local_version=$(kiwi_version)
while read -r project arch; do
echo $project
while read -r result; do
test -z "${result}" && continue
package=$(echo "${result}" | cut -f2 -d \")
build_log=$(osc rbuildlog --last ${project} ${package} images ${arch})
kiwi_obs_version=$(kiwi_build_version "${build_log}")
if [ "$kiwi_obs_version" = "$kiwi_local_version" ];then
result="${result} kiwi=\"${kiwi_obs_version}\""
else
result="${result} kiwi=\"want: ${kiwi_local_version} "
result="${result} got: ${kiwi_obs_version}\""
fi
echo " ${result}"
done < <(
osc results "${project}" --xml |\
grep status | cut -f2 -d \< | cut -f1 -d \/
)
done < .obs_test