sonarcloud.sh 535 B

123456789101112
  1. #!/bin/sh
  2. set -eu
  3. RUN_SONARCLOUD="${RUN_SONARCLOUD:-0}"
  4. if [ "${RUN_SONARCLOUD}" = "1" ] && [ ! -z ${SONAR_TOKEN+x} ]; then
  5. ./configure
  6. build-wrapper-linux-x86-64 --out-dir bw-output make -C build
  7. sonar-scanner -Dsonar.projectKey=SoftEtherVPN_SoftEtherVPN -Dsonar.organization=softethervpn -Dsonar.sources=. -Dsonar.cfamily.build-wrapper-output=bw-output -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${SONAR_TOKEN}
  8. else
  9. echo "Skipping sonar-scan because \$RUN_SONARCLOUD != \"1\" or \$SONAR_TOKEN is not set"
  10. fi