You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2018/06/05 20:06:05 UTC
[sling-whiteboard] branch master updated: Check to make sure maven
both doesn't redirect and returns a valid response
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
The following commit(s) were added to refs/heads/master by this push:
new d75b7df Check to make sure maven both doesn't redirect and returns a valid response
d75b7df is described below
commit d75b7df536898344b35ab392f4b2ed91ab6917ac
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Jun 5 16:05:07 2018 -0400
Check to make sure maven both doesn't redirect and returns a valid response
---
gh-badge-script/add-badges.sh | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/gh-badge-script/add-badges.sh b/gh-badge-script/add-badges.sh
index f181c8f..52205be 100755
--- a/gh-badge-script/add-badges.sh
+++ b/gh-badge-script/add-badges.sh
@@ -48,9 +48,14 @@ function update_badges () {
MAVEN_BADGE_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" https://maven-badges.herokuapp.com/maven-central/org.apache.sling/$ARTIFACT_ID/badge.svg)
if [ "$MAVEN_BADGE_RESPONSE" = "200" ]; then
- echo "Adding Maven release badge for $ARTIFACT_ID"
- LINE=" [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/$ARTIFACT_ID/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22$ARTIFACT_ID%22)"
- prepend
+ MAVEN_BADGE_CONTENTS=$(curl -L https://maven-badges.herokuapp.com/maven-central/org.apache.sling/$ARTIFACT_ID/badge.svg)
+ if [[ $MAVEN_BADGE_CONTENTS != *"unkown"* ]]; then
+ echo "Adding Maven release badge for $ARTIFACT_ID"
+ LINE=" [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/$ARTIFACT_ID/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22$ARTIFACT_ID%22)"
+ prepend
+ else
+ echo "No Maven release found for $ARTIFACT_ID"
+ fi
else
echo "No Maven release found for $ARTIFACT_ID"
fi
--
To stop receiving notification emails like this one, please contact
dklco@apache.org.