Skip to content
Snippets Groups Projects
Commit 16d1698e authored by Gervaise Henry's avatar Gervaise Henry :cowboy:
Browse files

Create badges for branches

parent 966f8a7a
Branches
Tags
1 merge request!58Develop
Pipeline #8716 failed with stages
in 1 minute and 41 seconds
......@@ -27,10 +27,12 @@ build_badges:
artifacts:
paths:
- badges/release.svg
- badges/pipeline.svg
- badges/nextflow.svg
when: always
expire_in: 3 months
- badges/releasePipeline.svg
- badges/releaseNextflow.svg
- badges/masterPipeline.svg
- badges/masterNextflow.svg
- badges/developPipeline.svg
- badges/developNextflow.svg
pages:
stage: deploy_badges
......
......@@ -2,11 +2,19 @@
echo "collecting stats for badges"
latest_release_tag=$(git tag --sort=-committerdate -l *.*.* | head -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 "(?<=').*(?=')")
current_pipeline_version=$(git show ${latest_release_tag}:workflow/nextflow.config | grep -o version.* | grep -oP "(?<=').*(?=')")
current_nextflow_version=$(git show ${latest_release_tag}:workflow/nextflow.config | grep -o nextflowVersion.* | grep -oP "(?<=').*(?=')")
master_pipeline_version=$(git show master:workflow/nextflow.config | grep -o version.* | grep -oP "(?<=').*(?=')")
master_nextflow_version=$(git show master:workflow/nextflow.config | grep -o nextflowVersion.* | grep -oP "(?<=').*(?=')")
develop_pipeline_version=$(git show develop:workflow/nextflow.config | grep -o version.* | grep -oP "(?<=').*(?=')")
develop_nextflow_version=$(git show develop:workflow/nextflow.config | grep -o nextflowVersion.* | grep -oP "(?<=').*(?=')")
echo "collecting badges"
mkdir badges
curl --request GET https://img.shields.io/badge/Latest%20Release-${latest_release_tag}-green?style=plastic > ./badges/release.svg
curl --request GET https://img.shields.io/badge/Pipeline%20Version-${current_pipeline_version}-green?style=plastic > ./badges/pipeline.svg
curl --request GET https://img.shields.io/badge/Nextflow%20Version-${current_nextflow_version}-green?style=plastic > ./badges/nextflow.svg
\ No newline at end of file
curl --request GET https://img.shields.io/badge/Pipeline%20Version branch-${current_pipeline_version}-green?style=plastic > ./badges/releasePipeline.svg
curl --request GET https://img.shields.io/badge/Nextflow%20Version-${current_nextflow_version}-green?style=plastic > ./badges/releaseNextflow.svg
curl --request GET https://img.shields.io/badge/Pipeline%20Version branch-${current_pipeline_version}-green?style=plastic > ./badges/masterPipeline.svg
curl --request GET https://img.shields.io/badge/Nextflow%20Version-${current_nextflow_version}-green?style=plastic > ./badges/masterNextflow.svg
curl --request GET https://img.shields.io/badge/Pipeline%20Version branch-${current_pipeline_version}-green?style=plastic > ./badges/developPipeline.svg
curl --request GET https://img.shields.io/badge/Nextflow%20Version-${current_nextflow_version}-green?style=plastic > ./badges/developNextflow.svg
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment