| 
									
										
										
										
											2023-05-01 16:32:59 +08:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							| 
									
										
										
										
											2023-07-12 23:26:16 +08:00
										 |  |  | set -uo pipefail | 
					
						
							| 
									
										
										
										
											2023-05-01 16:32:59 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | GOLDEN=$1 | 
					
						
							|  |  |  | SECOND=$2 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-12 23:26:16 +08:00
										 |  |  | failure_count=0 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-01 16:32:59 +08:00
										 |  |  | echo "Check both have INSTALL" | 
					
						
							| 
									
										
										
										
											2023-07-12 23:26:16 +08:00
										 |  |  | test -f $GOLDEN/rabbitmq_server-${VERSION}/INSTALL || ((failure_count++)) | 
					
						
							|  |  |  | test -f $SECOND/rabbitmq_server-${VERSION}/INSTALL || ((failure_count++)) | 
					
						
							| 
									
										
										
										
											2023-05-01 16:32:59 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | echo "Check LICENSEs" | 
					
						
							|  |  |  | diff \
 | 
					
						
							|  |  |  |     <(grep LICENSE make.manifest) \
 | 
					
						
							| 
									
										
										
										
											2023-07-12 23:26:16 +08:00
										 |  |  |     <(grep LICENSE bazel.manifest | grep -v ".md" | grep -v ".txt") \
 | 
					
						
							|  |  |  |          || ((failure_count++)) | 
					
						
							| 
									
										
										
										
											2023-05-01 16:32:59 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | echo "Check plugins" | 
					
						
							|  |  |  | plugins_rel=rabbitmq_server-${VERSION}/plugins | 
					
						
							| 
									
										
										
										
											2023-07-12 23:26:16 +08:00
										 |  |  | diff \
 | 
					
						
							|  |  |  |     <(grep $plugins_rel make.manifest | grep -v ".ez") \
 | 
					
						
							|  |  |  |     <(grep $plugins_rel bazel.manifest | grep -v ".ez") \
 | 
					
						
							|  |  |  |          || ((failure_count++)) | 
					
						
							| 
									
										
										
										
											2023-05-01 16:32:59 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | echo "Plugins exist with same version and deps" | 
					
						
							| 
									
										
										
										
											2023-07-12 23:26:16 +08:00
										 |  |  | for p in ${PLUGINS} ${EXTRA_PLUGINS}; do | 
					
						
							| 
									
										
										
										
											2023-05-01 16:32:59 +08:00
										 |  |  |     echo "$p" | 
					
						
							|  |  |  |     f="$(cd $GOLDEN && ls -d $plugins_rel/$p-*)" | 
					
						
							| 
									
										
										
										
											2023-07-12 23:26:16 +08:00
										 |  |  |     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++))) | 
					
						
							| 
									
										
										
										
											2023-05-01 16:32:59 +08:00
										 |  |  |     ./rabbitmq-server/tools/erlang_app_equal \
 | 
					
						
							| 
									
										
										
										
											2023-07-12 23:26:16 +08:00
										 |  |  |         $GOLDEN/$f/ebin/$p.app \
 | 
					
						
							|  |  |  |         $SECOND/$f/ebin/$p.app \
 | 
					
						
							|  |  |  |              || ((failure_count++)) | 
					
						
							| 
									
										
										
										
											2023-05-01 16:32:59 +08:00
										 |  |  | done | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo "Both have escript" | 
					
						
							|  |  |  | escript_rel=rabbitmq_server-${VERSION}/escript | 
					
						
							| 
									
										
										
										
											2023-07-12 23:26:16 +08:00
										 |  |  | diff \
 | 
					
						
							|  |  |  |     <(grep $escript_rel make.manifest) \
 | 
					
						
							|  |  |  |     <(grep $escript_rel bazel.manifest) \
 | 
					
						
							|  |  |  |          || ((failure_count++)) | 
					
						
							| 
									
										
										
										
											2023-05-01 16:32:59 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | echo "Both have sbin" | 
					
						
							|  |  |  | sbin_rel=rabbitmq_server-${VERSION}/sbin | 
					
						
							| 
									
										
										
										
											2023-07-12 23:26:16 +08:00
										 |  |  | diff \
 | 
					
						
							|  |  |  |     <(grep $sbin_rel make.manifest) \
 | 
					
						
							|  |  |  |     <(grep $sbin_rel bazel.manifest) \
 | 
					
						
							|  |  |  |          || ((failure_count++)) | 
					
						
							| 
									
										
										
										
											2023-05-01 16:32:59 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | echo "Both have manpages" | 
					
						
							|  |  |  | manpages_rel=rabbitmq_server-${VERSION}/share/man | 
					
						
							| 
									
										
										
										
											2023-07-12 23:26:16 +08:00
										 |  |  | diff \
 | 
					
						
							|  |  |  |     <(grep $manpages_rel make.manifest) \
 | 
					
						
							|  |  |  |     <(grep $manpages_rel bazel.manifest) \
 | 
					
						
							|  |  |  |          || ((failure_count++)) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo "There were $failure_count failures." | 
					
						
							| 
									
										
										
										
											2023-05-01 16:32:59 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-12 23:26:16 +08:00
										 |  |  | exit $failure_count |