From 464bb154f30f4f7b8f8d465295c1d6665dde47bd Mon Sep 17 00:00:00 2001 From: Andris Raugulis Date: Wed, 5 Apr 2017 04:25:01 +0300 Subject: [PATCH] Use git commit as dev version suffix. Add badge. --- README.md | 2 +- test/tools/ci-linux.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d709a1a..65281c2 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![travis build status](https://api.travis-ci.org/arthepsy/ssh-audit.svg?branch=develop)](https://travis-ci.org/arthepsy/ssh-audit) [![appveyor build status](https://ci.appveyor.com/api/projects/status/4m5r73m0r023edil/branch/develop?svg=true)](https://ci.appveyor.com/project/arthepsy/ssh-audit) [![codecov](https://codecov.io/gh/arthepsy/ssh-audit/branch/develop/graph/badge.svg)](https://codecov.io/gh/arthepsy/ssh-audit) -[![coverage status](https://coveralls.io/repos/github/arthepsy/ssh-audit/badge.svg)](https://coveralls.io/github/arthepsy/ssh-audit) +[![Quality Gate](https://sonarqube.com/api/badges/gate?key=arthepsy-github%3Assh-audit%3Adevelop&template=ROUNDED)](https://sq.evolutiongaming.com/dashboard?id=arthepsy-github%3Assh-audit%3Adevelop) **ssh-audit** is a tool for ssh server auditing. ## Features diff --git a/test/tools/ci-linux.sh b/test/tools/ci-linux.sh index ba423e5..0bb0253 100755 --- a/test/tools/ci-linux.sh +++ b/test/tools/ci-linux.sh @@ -292,8 +292,8 @@ ci_sq_run() { return 1 fi if [ -z "${_project_ver##*dev}" ]; then - local _git_rc=$(git rev-list --count `git rev-parse HEAD`) - _project_ver="${_project_ver}.${_git_rc}" + local _git_commit=$(git rev-parse --short=8 HEAD) + _project_ver="${_project_ver}.${_git_commit}" fi [ ${CI_VERBOSE} -gt 0 ] && echo "[ci] run sonar-scanner for ${_project_ver}" "${SONAR_SCANNER_PATH}" -X \