From 5379cc65b4505e11c4c7e3a6a04d5ba6d015a8bc Mon Sep 17 00:00:00 2001 From: Dariusz Dwornikowski Date: Tue, 14 Jul 2020 09:45:39 +0200 Subject: [PATCH] Add setting of projectVersion --- action.yaml | 6 +++++- entrypoint.sh | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index 5e44bae..d221890 100644 --- a/action.yaml +++ b/action.yaml @@ -16,7 +16,11 @@ inputs: required: false default: "" projectName: - description: "The project's name. If not given name will be generated by SonarQube" + description: "Name of the project that will be displayed on the web interface." + required: false + default: "" + projectVersion: + description: "The project version." required: false default: "" projectBaseDir: diff --git a/entrypoint.sh b/entrypoint.sh index a38febe..6b59027 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -13,6 +13,7 @@ fi [[ ! -z ${INPUT_PASSWORD} ]] && SONAR_PASSWORD="${INPUT_PASSWORD}" || SONAR_PASSWORD="" [[ -z ${INPUT_PROJECTKEY} ]] && SONAR_PROJECTKEY="${PWD##*/}" || SONAR_PROJECTKEY="${INPUT_PROJECTKEY}" [[ -z ${INPUT_PROJECTNAME} ]] && SONAR_PROJECTNAME="${PWD##*/}" || SONAR_PROJECTKEY="${INPUT_PROJECTNAME}" +[[ -z ${INPUT_PROJECTVERSION} ]] && SONAR_PROJECTVERSION="${PWD##*/}" || SONAR_PROJECTKEY="${INPUT_PROJECTVERSION}" sonar-scanner \