Previously, there were cases when the polylint bazel test would fail due to the unzip command failing. This was encountered locally, but may occur any time polylint_test.sh was run on the same bazel build twice. The bower components would fail to unzip and the script would terminate with an error. Adding the -o param forces overwrites of existing files, if they exist. Change-Id: I931b5537a473a866d580815808d5fdbe16f1ca65
		
			
				
	
	
		
			20 lines
		
	
	
		
			486 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			486 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh
 | 
						|
 | 
						|
set -ex
 | 
						|
 | 
						|
npm_bin=$(which npm)
 | 
						|
if [[ -z "$npm_bin" ]]; then
 | 
						|
    echo "NPM must be on the path."
 | 
						|
    exit 1
 | 
						|
fi
 | 
						|
 | 
						|
polylint_bin=$(which polylint)
 | 
						|
if [[ -z "$polylint_bin" ]]; then
 | 
						|
    echo "You must install polylint and its dependencies from NPM."
 | 
						|
    echo "> npm install -g polylint"
 | 
						|
    exit 1
 | 
						|
fi
 | 
						|
 | 
						|
unzip -o polygerrit-ui/polygerrit_components.bower_components.zip -d polygerrit-ui/app
 | 
						|
 | 
						|
${polylint_bin} --root polygerrit-ui/app --input elements/gr-app.html --b 'bower_components' |