 0a6495efc9
			
		
	
	0a6495efc9
	
	
	
		
			
			Add a test that ensures that the checked in version is up to date. The license generation is tied closely to the Bazel build and the layout of the Gerrit source tree. By checking in the license files, alternative builds (such as the Google internal build) do not have to replicate the license generation step, or rerun the upstream Gerrit bazel build. Change-Id: I500717e38de6c337ce552815e46562648df48b2f
		
			
				
	
	
		
			16 lines
		
	
	
		
			399 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			399 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| hook=$(pwd)/resources/com/google/gerrit/server/tools/root/hooks/commit-msg
 | |
| 
 | |
| for f in  js_licenses licenses ; do
 | |
|   if ! diff -u Documentation/${f}.txt Documentation/${f}.gen.txt  ; then
 | |
|      echo ""
 | |
|      echo "FAIL: ${f}.txt out of date"
 | |
|      echo "to fix: "
 | |
|      echo ""
 | |
|      echo "  cp bazel-genfiles/Documentation/${f}.gen.txt Documentation/${f}.txt"
 | |
|      echo ""
 | |
|      exit 1
 | |
|   fi
 | |
| done
 |