forked from rabbitmq/rabbitmq-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompare_dist.sh
executable file
·62 lines (51 loc) · 1.84 KB
/
compare_dist.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
61
62
#!/usr/bin/env bash
set -uo pipefail
GOLDEN=$1
SECOND=$2
failure_count=0
echo "Check both have INSTALL"
test -f $GOLDEN/rabbitmq_server-${VERSION}/INSTALL || ((failure_count++))
test -f $SECOND/rabbitmq_server-${VERSION}/INSTALL || ((failure_count++))
echo "Check LICENSEs"
diff \
<(grep LICENSE make.manifest) \
<(grep LICENSE bazel.manifest | grep -v ".md" | grep -v ".txt") \
|| ((failure_count++))
echo "Check plugins"
plugins_rel=rabbitmq_server-${VERSION}/plugins
diff \
<(grep $plugins_rel make.manifest | grep -v ".ez") \
<(grep $plugins_rel bazel.manifest | grep -v ".ez") \
|| ((failure_count++))
echo "Plugins exist with same version and deps"
for p in ${PLUGINS} ${EXTRA_PLUGINS}; do
echo "$p"
f="$(cd $GOLDEN && ls -d $plugins_rel/$p-*)"
test -f $GOLDEN/$f/ebin/$p.app || (echo "$GOLDEN/$f/ebin/$p.app does not exist"; ((failure_count++)))
test -d $SECOND/$f || (echo "$SECOND/$f does not exist"; ((failure_count++)))
test -f $SECOND/$f/ebin/$p.app || (echo "$SECOND/$f/ebin/$p.app does not exist"; ((failure_count++)))
./rabbitmq-server/tools/erlang_app_equal \
$GOLDEN/$f/ebin/$p.app \
$SECOND/$f/ebin/$p.app \
|| ((failure_count++))
done
echo "Both have escript"
escript_rel=rabbitmq_server-${VERSION}/escript
diff \
<(grep $escript_rel make.manifest) \
<(grep $escript_rel bazel.manifest) \
|| ((failure_count++))
echo "Both have sbin"
sbin_rel=rabbitmq_server-${VERSION}/sbin
diff \
<(grep $sbin_rel make.manifest) \
<(grep $sbin_rel bazel.manifest) \
|| ((failure_count++))
echo "Both have manpages"
manpages_rel=rabbitmq_server-${VERSION}/share/man
diff \
<(grep $manpages_rel make.manifest) \
<(grep $manpages_rel bazel.manifest) \
|| ((failure_count++))
echo "There were $failure_count failures."
exit $failure_count