mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Travis: Fix secret leakage and also upload on PRs
This commit is contained in:
parent
d1495118c0
commit
fe3f8eabf1
2 changed files with 8 additions and 7 deletions
Binary file not shown.
|
|
@ -1,21 +1,18 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -ex
|
# Do not add -x here, otherwise secrets are leaked
|
||||||
|
set -e
|
||||||
|
|
||||||
SELF_DIR="$(dirname $0)"
|
SELF_DIR="$(dirname $0)"
|
||||||
GIT_COMMIT_PATH="$SELF_DIR/../.hypothesis/examples"
|
GIT_COMMIT_PATH="$SELF_DIR/../.hypothesis/examples"
|
||||||
|
|
||||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
|
||||||
echo "Not building on pull request."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
_is_dirty() {
|
_is_dirty() {
|
||||||
(! git diff-index --quiet HEAD $GIT_COMMIT_PATH) || [ "$(git status --porcelain $GIT_COMMIT_PATH | tail -n1)" != "" ]
|
(! git diff-index --quiet HEAD $GIT_COMMIT_PATH) || [ "$(git status --porcelain $GIT_COMMIT_PATH | tail -n1)" != "" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
openssl aes-256-cbc -K $encrypted_a527bcd44658_key -iv $encrypted_a527bcd44658_iv -in $SELF_DIR/id_travis.enc -out /tmp/id_travis -d
|
openssl aes-256-cbc -K $encrypted_a527bcd44658_key -iv $encrypted_a527bcd44658_iv -in $SELF_DIR/id_travis.enc -out /tmp/id_travis -d
|
||||||
|
|
||||||
chmod 600 /tmp/id_travis
|
chmod 600 /tmp/id_travis
|
||||||
|
|
||||||
eval `ssh-agent -s`
|
eval `ssh-agent -s`
|
||||||
|
|
@ -27,7 +24,11 @@ if _is_dirty; then
|
||||||
git config --global user.name "Travis CI for pimutils"
|
git config --global user.name "Travis CI for pimutils"
|
||||||
|
|
||||||
git remote set-url origin git@github.com:pimutils/vdirsyncer
|
git remote set-url origin git@github.com:pimutils/vdirsyncer
|
||||||
git checkout $TRAVIS_BRANCH
|
if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ]; then
|
||||||
|
git checkout "$TRAVIS_PULL_REQUEST_BRANCH"
|
||||||
|
else
|
||||||
|
git checkout "$TRAVIS_BRANCH"
|
||||||
|
fi
|
||||||
|
|
||||||
git add -fA $GIT_COMMIT_PATH
|
git add -fA $GIT_COMMIT_PATH
|
||||||
git commit -m "Hypothesis examples, job $TRAVIS_JOB_NUMBER"
|
git commit -m "Hypothesis examples, job $TRAVIS_JOB_NUMBER"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue