Last active
December 6, 2018 13:18
-
-
Save paulbrodner/e2dc5fdd3d439698868d61ff9c436b3e to your computer and use it in GitHub Desktop.
do a whitesource scan on an array of projects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # places relative to root - current folder | |
| places=("enterpriseprojects/" | |
| "modules/sharepoint/amp" | |
| "packaging" | |
| "packaging/distribution" | |
| "packaging/distribution-docker/" | |
| "packaging/file-transfer-receiver" | |
| "packaging/installer/" | |
| "packaging/solr1" | |
| "packaging/solr4" | |
| "projects/3rd-party" | |
| "projects/dev-tomcat" | |
| "projects/file-transfer-receiver" | |
| "projects/legacy-lucene" | |
| "projects/mbeans/" | |
| "projects/office-application" | |
| "projects/remote-api" | |
| "projects/repository" | |
| "projects/solr" | |
| "projects/solr-client/" | |
| "projects/system-build-test/" | |
| "projects/tomcat/" | |
| "projects/web-client/" | |
| ) | |
| #start from root | |
| root=${PWD} | |
| PRODUCT_NAME="${1:-Testing}" | |
| function scan() { | |
| DIR="$1" | |
| echo "Scanning ${DIR}" | |
| shift | |
| (cd $DIR; mvn org.whitesource:whitesource-maven-plugin:update -Dorg.whitesource.product=${PRODUCT_NAME} -Dorg.whitesource.orgToken=$WHITESOURCE_API_KEY -Dorg.whitesource.ignorePomModules=false ) | |
| } | |
| for folder in ${places[@]} | |
| do | |
| scan $root/$folder | |
| done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment