-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Compliance): update first line of README with latest badge status
- Loading branch information
1 parent
13c58c7
commit 55b34b8
Showing
2 changed files
with
16 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |