diff --git a/workflow/scripts/get_updated_rep_count.sh b/workflow/scripts/get_updated_rep_count.sh index 592da9d99e8cf5d31511f92febaeea8f966e1f08..55c51a098e519d794967266998d2132725ad7451 100644 --- a/workflow/scripts/get_updated_rep_count.sh +++ b/workflow/scripts/get_updated_rep_count.sh @@ -17,23 +17,32 @@ dev_count=0 for rid in ${dev_workflow_RID} do temp_count=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Success/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l) - dev_count=$(expr ${dev_count} + ${temp_count}) + dev_success=$(expr ${dev_success} + ${temp_count}) + temp_count=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Error/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l) + dev_error=$(expr ${dev_error} + ${temp_count}) done staging_count=0 for rid in ${staging_workflow_RID} do temp_count=$(curl -s https://staging.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Success/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l) - staging_count=$(expr ${staging_count} + ${temp_count}) + staging_success=$(expr ${staging_success} + ${temp_count}) + temp_count=$(curl -s https://staging.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Error/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l) + staging_error=$(expr ${staging_error} + ${temp_count}) done prod_count=0 for rid in ${prod_workflow_RID} do temp_count=$(curl -s https://www.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Success/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l) - prod_count=$(expr ${prod_count} + ${temp_count}) + prod_success=$(expr ${prod_success} + ${temp_count}) + temp_count=$(curl -s https://www.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Error/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l) + prod_error=$(expr ${prod_error} + ${temp_count}) done echo "collecting badges" mkdir -p ./badges/counts -curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${dev_count}-lightgrey?style=flat > ./badges/counts/dev_counts.svg -curl --request GET https://img.shields.io/badge/Staging%20Replicate%20Count-${staging_count}-lightgrey?style=flat > ./badges/counts/staging_counts.svg -curl --request GET https://img.shields.io/badge/Production%20Replicate%20Count-${prod_count}-lightgrey?style=flat > ./badges/counts/prod_counts.svg +curl --request GET https://img.shields.io/badge/Development%20Replicate%20Success-${dev_success}-lightgrey?style=flat > ./badges/counts/dev_success.svg +curl --request GET https://img.shields.io/badge/Staging%20Replicate%20Success-${staging_success}-lightgrey?style=flat > ./badges/counts/staging_success.svg +curl --request GET https://img.shields.io/badge/Production%20Replicate%20Success-${prod_success}-lightgrey?style=flat > ./badges/counts/prod_success.svg +curl --request GET https://img.shields.io/badge/Development%20Replicate%20Error-${dev_error}-lightgrey?style=flat > ./badges/counts/dev_error.svg +curl --request GET https://img.shields.io/badge/Staging%20Replicate%20Error-${staging_error}-lightgrey?style=flat > ./badges/counts/staging_error.svg +curl --request GET https://img.shields.io/badge/Production%20Replicate%20Error-${prod_error}-lightgrey?style=flat > ./badges/counts/prod_error.svg