Travis should upload .sym files to the symbols branch

This commit is contained in:
Rangi 2020-06-20 22:39:45 -04:00
parent ac0025064f
commit fcaaf45da5
2 changed files with 19 additions and 1 deletions

View File

@ -24,5 +24,8 @@ script:
after_success:
- |-
if [ "$TRAVIS_BRANCH" = master -a "$TRAVIS_PULL_REQUEST" = false -a "$TRAVIS_OS_NAME" = linux ]; then
./.travis/webhook.sh
./.travis/webhook.sh
if [ -n "$GITHUB_API_KEY" ]; then
./.travis/upload_symbols.sh
fi
fi

15
.travis/upload_symbols.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
set -e
commit_message=$(git log -1 --pretty=%B)
mkdir symbols
pushd symbols
git clone -b symbols https://github.com/pret/pokecrystal
cp ../*.sym .
git add *.sym
git -c user.name='travis' -c user.email='travis@travis-ci.org' commit -m "$commit_message"
git push -f -q https://Rangi42:$GITHUB_API_KEY@github.com/pret/pokecrystal symbols &>/dev/null
popd