diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bf1f5eef8179b78e8a45b07541fc103d6ede9649..a2de25ad0b749c407d6bae24a0605cff86ea7680 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,9 @@ build_bages: - ./get-updated-badge-info.sh artifacts: paths: - - badges.json + - release.svg + - pipeline.svg + - nextflow.svg when: always expire_in: 3 months diff --git a/get-updated-badge-info.sh b/get-updated-badge-info.sh index 9dcd5e009db30d03f4992e7852507f9432b9ee7a..30fccec97ada69c270d2c46255b41e246d96dea9 100644 --- a/get-updated-badge-info.sh +++ b/get-updated-badge-info.sh @@ -1,9 +1,11 @@ #!/bin/bash echo "collecting stats for badges" - -commits=`git rev-list --all --count` latest_release_tag=$(git describe --tags `git rev-list --tags --max-count=1`) current_pipeline_version=$(cat ./workflow/nextflow.config | grep -o version.* | grep -oP "(?<=').*(?=')") current_nextflow_version=$(cat ./workflow/nextflow.config | grep -o nextflowVersion.* | grep -oP "(?<=').*(?=')") -echo "{\"commits\":\"$commits\", \"release_tag\":\"$latest_release_tag\", \"pipeline\":\"$current_pipeline_version\", \"nextflow\":\"$current_nextflow_version\"}" > badges.json \ No newline at end of file + +echo "collecting badges" +curl --request GET https://img.shields.io/badge/Latest%20Release-${latest_release_tag}-green?style=plastic > release.svg +curl --request GET https://img.shields.io/badge/Pipeline%20Version-${current_pipeline_version}-green?style=plastic > pipeline.svg +curl --request GET https://img.shields.io/badge/Nextflow%20Version-${current_nextflow_version}-green?style=plastic > nextflow.svg \ No newline at end of file