aboutsummaryrefslogtreecommitdiffstats
path: root/travis.sh
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-07-20 17:00:13 +0200
committerGitHub <noreply@github.com>2016-07-20 17:00:13 +0200
commitca4b66297fe5350b67c3baa9cebf75841fda9dcd (patch)
tree1eef07752d9d0c33566f8a5766fd93481e1b8abc /travis.sh
parentf2a4cc09da9da36527b9262dc57e85e46d4f329f (diff)
downloadsonarqube-ca4b66297fe5350b67c3baa9cebf75841fda9dcd.tar.gz
sonarqube-ca4b66297fe5350b67c3baa9cebf75841fda9dcd.zip
Fix blame info when analysing SonarQube
Diffstat (limited to 'travis.sh')
-rwxr-xr-xtravis.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/travis.sh b/travis.sh
index 5e038bf43aa..28d071da164 100755
--- a/travis.sh
+++ b/travis.sh
@@ -19,6 +19,13 @@ CI)
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo 'Analyse and trigger QA of master branch'
+ # Fetch all commit history so that SonarQube has exact blame information
+ # for issue auto-assignment
+ # This command can fail with "fatal: --unshallow on a complete repository does not make sense"
+ # if there are not enough commits in the Git repository (even if Travis executed git clone --depth 50).
+ # For this reason errors are ignored with "|| true"
+ git fetch --unshallow || true
+
# Do not deploy a SNAPSHOT version but the release version related to this build
set_maven_build_version $TRAVIS_BUILD_NUMBER