Skip to content

Commit 8c963f3

Browse files
authored
build: use travis for config for conditionals instead of scripts (#893)
1 parent 76d6ab9 commit 8c963f3

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

.travis.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@ env:
55
global:
66
- secure: "WGObsHmjnqn5e0nbXLGetwpUHU0UgvNk02+f0m3jIS7hSdBy5m1JK2K6NXV13brY0C9i0DLy0e7JKabqmqTxI94dT0LrYBxcvfmtZ/7PujOn/D9CzVimGj6g20hBDYwAXL6KAIR7JL8qexQBwIkVZPdwaA+k+UHLM9XVoIQdFgU="
77
- secure: "XfBov3Z4Rk2AvS1v7o31Qr2XrO/oqQvl+Eksx9DO3XbGcLjT9wfGxGcYgP9IJO+Aa5AQo3Xud7EV4gqNpMa2PByzDdgg/nfyqSvrRvsG2aH1zm5N5bAHxCVlPimVdNtyeub6QBPCIGaWBp1R8x3Ak7F79mA5BdJuT9j5FBogC5U="
8-
script: .utility/do-build.sh
8+
9+
deploy:
10+
- provider: script
11+
script: .utility/build.sh
12+
on:
13+
all_branches: true
14+
- provider: script
15+
script: .utility/deploy.sh
16+
on:
17+
branch: master
918

1019
cache:
1120
directories:

.utility/do-build.sh .utility/build.sh

+1-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,5 @@ then
44
echo 'Travis can only publish docs for release builds.'
55
return 0
66
fi
7-
if [[ $TRAVIS_PULL_REQUEST == true || "$TRAVIS_BRANCH" != "master" ]]
8-
then
9-
mvn test
10-
else
11-
mvn clean deploy --settings .utility/settings.xml
12-
fi
13-
7+
mvn test
148
exit $?

.utility/deploy.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
if [[ "$TRAVIS_REPO_SLUG" != "MilkBowl/Vault" ]]
3+
then
4+
echo 'Travis can only publish docs for release builds.'
5+
return 0
6+
fi
7+
mvn clean deploy --settings .utility/settings.xml
8+
exit $?

0 commit comments

Comments
 (0)