@@ -35,13 +35,12 @@ install:
35
35
--git https://github.com/rust-lang/rustfmt \
36
36
--bin rustfmt
37
37
fi
38
- if [ "$TRAVIS_OS_NAME" == " linux" ]; then
38
+ if [[ "$TRAVIS_OS_NAME" == linux ] ]; then
39
39
. $HOME/.nvm/nvm.sh
40
40
nvm install stable
41
41
nvm use stable
42
42
npm install remark-cli remark-lint
43
- fi
44
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then
43
+ elif [[ "$TRAVIS_OS_NAME" == windows ]]; then
45
44
choco install windows-sdk-10.1
46
45
fi
47
46
fi
@@ -105,39 +104,44 @@ matrix:
105
104
106
105
script :
107
106
- |
108
- if [ "$TRAVIS_BRANCH" == "auto" ] || [ "$TRAVIS_BRANCH" == "try" ]; then
109
- pr =$(echo $TRAVIS_COMMIT_MESSAGE | grep -o "#[0-9]*" | head -1 | sed 's/^#//g')
110
- output=$(curl -H "Authorization: token $GITHUB_API_TOKEN" -s "https://github.com/api/repos/rust-lang/rust-clippy/pulls/$pr" | \
111
- python -c "import sys, json; print(json.load(sys.stdin)['body'])" | \
112
- grep "^changelog: " | \
113
- sed "s/changelog: //g")
114
- if [ -z "$output" ]; then
107
+ if [[ "$TRAVIS_BRANCH" == "auto" ]] || [[ "$TRAVIS_BRANCH" == "try" ] ]; then
108
+ PR =$(echo $TRAVIS_COMMIT_MESSAGE | grep -o "#[0-9]*" | head -1 | sed 's/^#//g')
109
+ output=$(curl -H "Authorization: token $GITHUB_API_TOKEN" -s "https://github.com/api/repos/rust-lang/rust-clippy/pulls/$PR" \
110
+ | python -c "import sys, json; print(json.load(sys.stdin)['body'])" \
111
+ | grep "^changelog: " \
112
+ | sed "s/changelog: //g")
113
+ if [[ -z "$output" ] ]; then
115
114
echo "ERROR: PR body must contain 'changelog: ...'"
116
115
exit 1
117
- elif [ "$output" = "none" ]; then
116
+ elif [[ "$output" = "none" ] ]; then
118
117
echo "WARNING: changelog is 'none'"
119
118
fi
120
119
fi
121
120
- |
122
- rm rust-toolchain
123
- ./setup-toolchain.sh
124
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then
125
- export PATH=$PATH:$(rustc --print sysroot)/bin
126
- else
127
- export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
128
- fi
121
+ set -e
122
+ rm rust-toolchain
123
+ ./setup-toolchain.sh
124
+ if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
125
+ export PATH=$PATH:$(rustc --print sysroot)/bin
126
+ else
127
+ export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
128
+ fi
129
+ set +e
129
130
- |
130
- if [ -z ${INTEGRATION} ]; then
131
+ if [[ -z ${INTEGRATION} ] ]; then
131
132
travis_wait 30 ./ci/base-tests.sh && sleep 5
132
133
else
133
134
./ci/integration-tests.sh && sleep 5
134
135
fi
135
136
136
- after_success : |
137
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
138
- if [ -z ${INTEGRATION} ]; then
139
- ./.github/deploy.sh
140
- else
141
- echo "Not deploying, because we're in an integration test run"
137
+ after_success :
138
+ - |
139
+ if [ "$TRAVIS_OS_NAME" == "linux" ]; then
140
+ if [[ -z ${INTEGRATION} ]]; then
141
+ set -e
142
+ ./.github/deploy.sh
143
+ set +e
144
+ else
145
+ echo "Not deploying, because we're in an integration test run"
146
+ fi
142
147
fi
143
- fi
0 commit comments