Skip to content

Commit

Permalink
chore(Compliance): update first line of README with latest badge status
Browse files Browse the repository at this point in the history
  • Loading branch information
lemoustachiste committed May 26, 2023
1 parent 13c58c7 commit 55b34b8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Verifiable Credential Compliance result](https://badgen.net/badge/Verifiable%20Credentials%20v1/compliant/green?icon=https://www.w3.org/Icons/WWW/w3c_home_nb-v.svg)](https://github.com/blockchain-certificates/cert-issuer/vc-compliance-report.html)
[![Build Status](https://travis-ci.org/blockchain-certificates/cert-issuer.svg?branch=master)](https://travis-ci.org/blockchain-certificates/cert-issuer)
[![PyPI version](https://badge.fury.io/py/cert-issuer.svg)](https://badge.fury.io/py/cert-issuer)

Expand Down
26 changes: 15 additions & 11 deletions publish-vc-compliance-result.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
#cp node_modules/vc-test-suite/implementations/index.html ./vc-compliance-report.html
cp node_modules/vc-test-suite/implementations/index.html ./vc-compliance-report.html

COMPLIANCE_RESULT=$( cat node_modules/vc-test-suite/implementations/test-status.txt )
if [ $COMPLIANCE_RESULT == "compliant" ];
then BADGE_COLOR="green";
else BADGE_COLOR="red";
fi
sed -i "1s/^/[![Verifiable Credential Compliance result](https://badgen.net/badge/Verifiable%20Credentials%20v1/$COMPLIANCE_RESULT/$BADGE_COLOR?icon=https://www.w3.org/Icons/WWW/w3c_home_nb-v.svg)](https://github.com/blockchain-certificates/cert-issuer/vc-compliance-report.html)\n/" README.md
cat README.md
#git checkout $TRAVIS_BRANCH
#git status
#git add vc-compliance-report.html
#git commit -m "chore(Compliance): update compliance report"
#echo "Pushing changes to $TRAVIS_BRANCH"
#git config credential.helper "store --file=.git/credentials"
#echo "https://${GH_TOKEN}:@github.com" > .git/credentials
#git push origin $TRAVIS_BRANCH --verbose
## replace first line of README with new badge value - couldn't get sed to work properly
echo "[![Verifiable Credential Compliance result](https://badgen.net/badge/Verifiable%20Credentials%20v1/$COMPLIANCE_RESULT/$BADGE_COLOR?icon=https://www.w3.org/Icons/WWW/w3c_home_nb-v.svg)](https://github.com/blockchain-certificates/cert-issuer/vc-compliance-report.html)" >> /tmp/cert-issuer-readme
tail -n +2 README.md >> /tmp/cert-issuer-readme
mv /tmp/cert-issuer-readme README.md

git checkout $TRAVIS_BRANCH
git status
git add vc-compliance-report.html README.md
git commit -m "chore(Compliance): update compliance report"
echo "Pushing changes to $TRAVIS_BRANCH"
git config credential.helper "store --file=.git/credentials"
echo "https://${GH_TOKEN}:@github.com" > .git/credentials
git push origin $TRAVIS_BRANCH --verbose

0 comments on commit 55b34b8

Please sign in to comment.