Redirect ant update errors to a file and push correct upload-binaries.sh

This commit is contained in:
xawotihs
2013-12-05 21:43:29 +01:00
parent ae97abbf96
commit e9eb86488e
2 changed files with 12 additions and 21 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
# updating versions with the TRAVIS build numbers # updating versions with the TRAVIS build numbers
cd projects/mtg/ cd projects/mtg/
ant update ant update > error.txt
cd ../.. cd ../..
# we're building a PSP binary here # we're building a PSP binary here
+11 -20
View File
@@ -2,27 +2,18 @@
if [ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "ci_upload_binaries"]; then if [ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "ci_upload_binaries"]; then
echo -e "Creating a release\n" 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 # Rename android release before upload
cp -R coverage $HOME/coverage cp projects/mtg/Android/bin/Wagic-debug.apk release/Wagic-android-${TRAVIS_BUILD_NUMBER}.apk
#go to home and setup git # Now we upload
cd $HOME curl -X POST -H "Authorization: token ${GH_TOKEN}" \
git config --global user.email "travis@travis-ci.org" -H "Accept: application/vnd.github.manifold-preview" \
git config --global user.name "Travis" -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 echo -e "Done uploading\n"
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"
fi fi