mirror of
				https://github.com/privacore/open-source-search-engine.git
				synced 2025-10-30 16:36:11 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			598 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			598 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| # Exit on failure
 | |
| set -e
 | |
| 
 | |
| installBuildWrapper() {
 | |
| 	export SONAR_HOME=$HOME/.sonar
 | |
| 	mkdir -p $SONAR_HOME
 | |
| 	curl -sSLo $SONAR_HOME/build-wrapper-linux-x86.zip https://sonarqube.com/static/cpp/build-wrapper-linux-x86.zip
 | |
| 	unzip $SONAR_HOME/build-wrapper-linux-x86.zip -d $SONAR_HOME
 | |
| 	rm $SONAR_HOME/build-wrapper-linux-x86.zip
 | |
| 	export PATH=$SONAR_HOME/build-wrapper-linux-x86:$PATH
 | |
| }
 | |
| 
 | |
| # Install the build-wrapper
 | |
| installBuildWrapper
 | |
| 
 | |
| make clean
 | |
| 
 | |
| # make using build-wrapper
 | |
| build-wrapper-linux-x86-64 --out-dir sonar-out make
 | |
| 
 | |
| # And run the analysis
 | |
| sonar-scanner -Dsonar.login=$SONAR_TOKEN
 | |
| 
 |