mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Don't leak GitHub tokens during network failures
If git is unable to resolve the repo address (which includes the token), it will print a message to stderr with the path to the repo, thus leaking the token. Avoid doing this, and also suppress stdout to be extra careful.
This commit is contained in:
parent
76a8bd9cf3
commit
630b523c06
2 changed files with 7 additions and 4 deletions
|
@ -16,7 +16,6 @@ PACKAGENAME=$(basename ${PACKAGEPATH})
|
||||||
REGEX="s/servo-.*\([0-9]\{4\}\)-\([0-9]\{2\}\)-\([0-9]\{2\}\).tar.gz/\1.\2.\3/p"
|
REGEX="s/servo-.*\([0-9]\{4\}\)-\([0-9]\{2\}\)-\([0-9]\{2\}\).tar.gz/\1.\2.\3/p"
|
||||||
VERSION=$(echo ${PACKAGENAME}| sed -n "${REGEX}")
|
VERSION=$(echo ${PACKAGENAME}| sed -n "${REGEX}")
|
||||||
SHA=$(shasum -a 256 ${PACKAGEPATH} | sed -e 's/ .*//')
|
SHA=$(shasum -a 256 ${PACKAGEPATH} | sed -e 's/ .*//')
|
||||||
GIT="https://${TOKEN}@github.com/servo/homebrew-servo.git"
|
|
||||||
|
|
||||||
# See upload_nightly.sh
|
# See upload_nightly.sh
|
||||||
PACKAGEURL="https://download.servo.org/nightly/macbrew/${PACKAGENAME}"
|
PACKAGEURL="https://download.servo.org/nightly/macbrew/${PACKAGENAME}"
|
||||||
|
@ -31,7 +30,7 @@ cd ${TMP_DIR}
|
||||||
echo ${TMP_DIR}
|
echo ${TMP_DIR}
|
||||||
|
|
||||||
echo "Cloning"
|
echo "Cloning"
|
||||||
git clone ${GIT}
|
git clone https://github.com/servo/homebrew-servo.git
|
||||||
cd homebrew-servo
|
cd homebrew-servo
|
||||||
|
|
||||||
# Not using "/" as it's used in PACKAGEURL
|
# Not using "/" as it's used in PACKAGEURL
|
||||||
|
@ -43,5 +42,7 @@ cat ${SCRIPTDIR}/servo-binary-formula.rb.in | sed \
|
||||||
git add ./Formula/servo-bin.rb
|
git add ./Formula/servo-bin.rb
|
||||||
git commit -m "Version bump: ${VERSION}"
|
git commit -m "Version bump: ${VERSION}"
|
||||||
|
|
||||||
git push -q ${GIT} master
|
git push -qf \
|
||||||
|
"https://${TOKEN}@github.com/servo/homebrew-servo.git" master \
|
||||||
|
>/dev/null 2>&1
|
||||||
rm -rf ${TMP_DIR}
|
rm -rf ${TMP_DIR}
|
||||||
|
|
|
@ -27,4 +27,6 @@ cp apis.html ../../target/doc/servo/
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
ghp-import -n target/doc
|
ghp-import -n target/doc
|
||||||
git push -qf "https://${TOKEN}@github.com/servo/doc.servo.org.git" gh-pages
|
git push -qf \
|
||||||
|
"https://${TOKEN}@github.com/servo/doc.servo.org.git" gh-pages \
|
||||||
|
>/dev/null 2>&1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue