From e5fbc37da1c01aadb9d98bc52fdb5b2c8a0896da Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 28 Apr 2017 17:14:07 +0200 Subject: [PATCH 1/2] Nightlies will now be automatically uploaded to the homebrew app store --- .travis.yml | 7 +++++-- ftpupload.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 ftpupload.sh diff --git a/.travis.yml b/.travis.yml index f0541cb..8ea8ae7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,7 +52,7 @@ before_deploy: - cd $TRAVIS_BUILD_DIR/ - mkdir -p "wiiu/apps/hidtovpad" - 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 - commit="$(git rev-parse --short=7 HEAD)" - chmod +x gitrev.sh @@ -60,7 +60,7 @@ before_deploy: - make - cp meta/* 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.name "Travis CI" - 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")" - 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 +- chmod +x ftpupload.sh +- ./ftpupload.sh +- cd $TRAVIS_BUILD_DIR/ deploy: provider: releases diff --git a/ftpupload.sh b/ftpupload.sh new file mode 100644 index 0000000..0998e17 --- /dev/null +++ b/ftpupload.sh @@ -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 From 8d2f3cd1cfe42725673dae97d6567a0a65be26e1 Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 28 Apr 2017 21:12:43 +0200 Subject: [PATCH 2/2] Changed the app name for the nightly builds --- gitrev.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitrev.sh b/gitrev.sh index df9b9e9..1267bcc 100644 --- a/gitrev.sh +++ b/gitrev.sh @@ -9,7 +9,7 @@ rev_date=`date -u +%Y%m%d%H%M%S` cat < ./meta/meta.xml - HID to VPAD + HID to VPAD - nightly Maschell tool https://gbatemp.net/threads/hid-to-vpad.424127/