This commit is contained in:
Maschell 2017-05-03 21:47:12 +02:00
commit 641af7920c
3 changed files with 35 additions and 3 deletions

View File

@ -52,7 +52,7 @@ before_deploy:
- cd $TRAVIS_BUILD_DIR/ - cd $TRAVIS_BUILD_DIR/
- mkdir -p "wiiu/apps/hidtovpad" - mkdir -p "wiiu/apps/hidtovpad"
- mkdir -p "wiiu/controller" - mkdir -p "wiiu/controller"
- git clone https://github.com/Maschell/controller_patcher_configs - git clone https://github.com/Maschell/controller_patcher_configs.git
- cp ./controller_patcher_configs/*.ini ./wiiu/controller - cp ./controller_patcher_configs/*.ini ./wiiu/controller
- commit="$(git rev-parse --short=7 HEAD)" - commit="$(git rev-parse --short=7 HEAD)"
- chmod +x gitrev.sh - chmod +x gitrev.sh
@ -60,7 +60,7 @@ before_deploy:
- make - make
- cp meta/* wiiu/apps/hidtovpad - cp meta/* wiiu/apps/hidtovpad
- cp hidtovpad.elf wiiu/apps/hidtovpad - cp hidtovpad.elf wiiu/apps/hidtovpad
- zip -r hid_to_vpad_$versiontag.zip wiiu meta.xml icon.png - zip -r hid_to_vpad_$versiontag.zip wiiu
- git config --global user.email "builds@travis-ci.com" - git config --global user.email "builds@travis-ci.com"
- git config --global user.name "Travis CI" - git config --global user.name "Travis CI"
- export GIT_TAG=HIDtoVPAD-$versiontag - export GIT_TAG=HIDtoVPAD-$versiontag
@ -68,6 +68,9 @@ before_deploy:
- commitMessage="$(echo -e "-\n" && echo "HID to VPAD nightly build. Not a stable release. Expect bugs!" && echo -e "\nCommitlog:\n")" - commitMessage="$(echo -e "-\n" && echo "HID to VPAD nightly build. Not a stable release. Expect bugs!" && echo -e "\nCommitlog:\n")"
- git tag $GIT_TAG -a -m "$commitMessage" -m "$commitLog" - git tag $GIT_TAG -a -m "$commitMessage" -m "$commitLog"
- git push --quiet https://$GITHUBKEY@github.com/Maschell/hid_to_vpad $GIT_TAG > /dev/null 2>&1 - git push --quiet https://$GITHUBKEY@github.com/Maschell/hid_to_vpad $GIT_TAG > /dev/null 2>&1
- chmod +x ftpupload.sh
- ./ftpupload.sh
- cd $TRAVIS_BUILD_DIR/
deploy: deploy:
provider: releases provider: releases

29
ftpupload.sh Normal file
View File

@ -0,0 +1,29 @@
#! /bin/bash
#
cd $TRAVIS_BUILD_DIR/wiiu/apps/hidtovpad
for entry in "$TRAVIS_BUILD_DIR/wiiu/apps/hidtovpad"/*; do
echo "Uploading ${entry##*/}"
curl --ftp-create-dirs -T "${entry##*/}" -u $FTP_USER:$FTP_PASSWORD "$FTP_SERVER/${entry##*/}" > /dev/null 2>&1
done
IFS=$'\n' # make newlines the only separator
for f in `curl -u $FTP_USER:$FTP_PASSWORD $FTP_SERVER/sd/wiiu/controller/ --silent --use-ascii --list-only`; do
if [ "$f" != "." ] && [ "$f" != ".." ]; then
echo "Deleting sd/wiiu/controller/${f##*/}"
curl -v -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_SERVER/ -Q "DELE sd/wiiu/controller/$f" --silent > /dev/null 2>&1
fi
done
cd $TRAVIS_BUILD_DIR/wiiu/controller
for entry in "$TRAVIS_BUILD_DIR/wiiu/controller"/*
do
echo "Uploading ${entry##*/}"
curl --ftp-create-dirs -T "${entry##*/}" -u $FTP_USER:$FTP_PASSWORD "$FTP_SERVER/sd/wiiu/controller/${entry##*/}" > /dev/null 2>&1
done
curl -v -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_SERVER/ -Q "DELE .deletetoupdate" --silent > /dev/null 2>&1
curl $REFRESH

View File

@ -9,7 +9,7 @@ rev_date=`date -u +%Y%m%d%H%M%S`
cat <<EOF > ./meta/meta.xml cat <<EOF > ./meta/meta.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app version="1"> <app version="1">
<name>HID to VPAD</name> <name>HID to VPAD - nightly</name>
<coder>Maschell</coder> <coder>Maschell</coder>
<category>tool</category> <category>tool</category>
<url>https://gbatemp.net/threads/hid-to-vpad.424127/</url> <url>https://gbatemp.net/threads/hid-to-vpad.424127/</url>