Redirect ant update errors to a file and push correct upload-binaries.sh
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# updating versions with the TRAVIS build numbers
|
||||
cd projects/mtg/
|
||||
ant update
|
||||
ant update > error.txt
|
||||
cd ../..
|
||||
|
||||
# we're building a PSP binary here
|
||||
|
||||
@@ -2,27 +2,18 @@
|
||||
|
||||
if [ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "ci_upload_binaries"]; then
|
||||
echo -e "Creating a release\n"
|
||||
curl -X POST -H "Authorization: token ${GH_TOKEN}" -d '{"tag_name": "pre-release-${TRAVIS_BUILD_NUMBER}", "target_commitish": "master", "name": "pre-release-${TRAVIS_BUILD_NUMBER}", "body": "Automatic pre-release ${TRAVIS_BUILD_NUMBER}", "draft": true, "prerelease": true}' "https://api.github.com/repos/WagicProject/wagic/releases"
|
||||
curl -X POST -H "Authorization: token ${GH_TOKEN}" \
|
||||
-d '{"tag_name": "pre-release-${TRAVIS_BUILD_NUMBER}", "target_commitish": "master", "name": "pre-release-${TRAVIS_BUILD_NUMBER}", "body": "Automatic pre-release ${TRAVIS_BUILD_NUMBER}", "draft": true, "prerelease": true}' "https://api.github.com/repos/WagicProject/wagic/releases"
|
||||
|
||||
#copy data we're interested in to other place
|
||||
cp -R coverage $HOME/coverage
|
||||
# Rename android release before upload
|
||||
cp projects/mtg/Android/bin/Wagic-debug.apk release/Wagic-android-${TRAVIS_BUILD_NUMBER}.apk
|
||||
|
||||
#go to home and setup git
|
||||
cd $HOME
|
||||
git config --global user.email "travis@travis-ci.org"
|
||||
git config --global user.name "Travis"
|
||||
# Now we upload
|
||||
curl -X POST -H "Authorization: token ${GH_TOKEN}" \
|
||||
-H "Accept: application/vnd.github.manifold-preview" \
|
||||
-H "Content-Type: application/zip" \
|
||||
--data-binary @release/Wagic-${TRAVIS_BUILD_NUMBER}.apk \
|
||||
"https://uploads.github.com/repos/WagicProject/wagic/releases/pre-release-${TRAVIS_BUILD_NUMBER}/assets?name=Wagic-android-${TRAVIS_BUILD_NUMBER}.apk"
|
||||
|
||||
#using token clone gh-pages branch
|
||||
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/Uko/Rubidium-WHOIS.git gh-pages > /dev/null
|
||||
|
||||
#go into diractory and copy data we're interested in to that directory
|
||||
cd gh-pages
|
||||
cp -Rf $HOME/coverage/* .
|
||||
|
||||
#add, commit and push files
|
||||
git add -f .
|
||||
git commit -m "Travis build $TRAVIS_BUILD_NUMBER pushed to gh-pages"
|
||||
git push -fq origin gh-pages > /dev/null
|
||||
|
||||
echo -e "Done magic with coverage\n"
|
||||
echo -e "Done uploading\n"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user