build: use travis for config for conditionals instead of scripts (#893)

This commit is contained in:
Morgan 2022-06-27 10:50:08 -07:00 committed by GitHub
parent 76d6ab9098
commit 8c963f39da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 8 deletions

View File

@ -5,7 +5,16 @@ env:
global:
- secure: "WGObsHmjnqn5e0nbXLGetwpUHU0UgvNk02+f0m3jIS7hSdBy5m1JK2K6NXV13brY0C9i0DLy0e7JKabqmqTxI94dT0LrYBxcvfmtZ/7PujOn/D9CzVimGj6g20hBDYwAXL6KAIR7JL8qexQBwIkVZPdwaA+k+UHLM9XVoIQdFgU="
- secure: "XfBov3Z4Rk2AvS1v7o31Qr2XrO/oqQvl+Eksx9DO3XbGcLjT9wfGxGcYgP9IJO+Aa5AQo3Xud7EV4gqNpMa2PByzDdgg/nfyqSvrRvsG2aH1zm5N5bAHxCVlPimVdNtyeub6QBPCIGaWBp1R8x3Ak7F79mA5BdJuT9j5FBogC5U="
script: .utility/do-build.sh
deploy:
- provider: script
script: .utility/build.sh
on:
all_branches: true
- provider: script
script: .utility/deploy.sh
on:
branch: master
cache:
directories:

View File

@ -4,11 +4,5 @@ then
echo 'Travis can only publish docs for release builds.'
return 0
fi
if [[ $TRAVIS_PULL_REQUEST == true || "$TRAVIS_BRANCH" != "master" ]]
then
mvn test
else
mvn clean deploy --settings .utility/settings.xml
fi
mvn test
exit $?

8
.utility/deploy.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
if [[ "$TRAVIS_REPO_SLUG" != "MilkBowl/Vault" ]]
then
echo 'Travis can only publish docs for release builds.'
return 0
fi
mvn clean deploy --settings .utility/settings.xml
exit $?