| 1 |
#!/bin/bash -e |
| 2 |
|
| 3 |
# echo hashed tokens for debug. |
| 4 |
# this script is run by travis on linux and osx. |
| 5 |
# this script is run by appveyor on windows under bash. |
| 6 |
|
| 7 |
#!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 8 |
# don't leak unhashed tokens! |
| 9 |
#!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 |
set +x |
| 11 |
if [ -n "${CODACY_PROJECT_TOKEN:+x}" ] ; then |
| 12 |
echo -n "CODACY_PROJECT_TOKEN hash: " |
| 13 |
echo -n "$CODACY_PROJECT_TOKEN" | openssl dgst -sha512 | cut -d " " -f 2 |
| 14 |
else |
| 15 |
echo CODACY_PROJECT_TOKEN null or not set. |
| 16 |
fi |
| 17 |
if [ -n "${GITHUB_TOKEN:+x}" ] ; then |
| 18 |
echo -n "GITHUB_TOKEN hash: " |
| 19 |
echo -n "$GITHUB_TOKEN" | openssl dgst -sha512 | cut -d " " -f 2 |
| 20 |
else |
| 21 |
echo GITHUB_TOKEN null or not set. |
| 22 |
fi |
| 23 |
set -x |