From bd818236db7f501a974cad184d9c250b55e1ea14 Mon Sep 17 00:00:00 2001 From: Ahmed Zetao Yang Date: Sun, 28 Apr 2019 20:50:54 +0800 Subject: [PATCH] fix ci error --- .travis.yml | 7 +++++-- scripts/appimage_after_success.sh | 7 +++++++ scripts/services/wetransfer.com.sh | 25 ------------------------- 3 files changed, 12 insertions(+), 27 deletions(-) create mode 100644 scripts/appimage_after_success.sh delete mode 100755 scripts/services/wetransfer.com.sh diff --git a/.travis.yml b/.travis.yml index f1105fb..63b65dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,8 +31,11 @@ install: script: - export ROOT_PATH="$(pwd)" + - chmod +x ${ROOT_PATH}/scripts/*.sh + - chmod +x ${ROOT_PATH}/scripts/services/*.sh - bash pkg2appimage-with-docker netease-cloud-music.yml after_success: - - cd ${ROOT_PATH}/out - - if [[ "${EXTEN}" == "appimage" ]]; then python3 ${ROOT_PATH}/scripts/services/transferwee.py upload NetEase_Cloud_Music-1.2.0.2.*.AppImage fi \ No newline at end of file + - cp ${ROOT_PATH}/out/*.AppImage ${ROOT_PATH}/scripts/services + - if [[ "${EXTEN}" == "appimage" ]]; then source ${ROOT_PATH}/scripts/appimage_after_success.sh; fi + - echo $TEMP_DOWNLOAD_URL \ No newline at end of file diff --git a/scripts/appimage_after_success.sh b/scripts/appimage_after_success.sh new file mode 100644 index 0000000..41b474c --- /dev/null +++ b/scripts/appimage_after_success.sh @@ -0,0 +1,7 @@ +#!/bin/bash -- + +set -e + +cd ${ROOT_PATH}/scripts/services + +TEMP_DOWNLOAD_URL=$(python3 transferwee.py upload NetEase_Cloud_Music-1.2.0.2.*.AppImage) \ No newline at end of file diff --git a/scripts/services/wetransfer.com.sh b/scripts/services/wetransfer.com.sh deleted file mode 100755 index eb948e1..0000000 --- a/scripts/services/wetransfer.com.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -#========================================================================================================================= -# WeTransfer is a service to send big or small files from A to B. -# It can transfer any type of file - such as presentations, photos, videos, music or documents - to friends and colleagues. -# You can send files up to 2 GB and they will be available for 7 days, with no registration. - -# API doc: https://developers.wetransfer.com/documentation -# Using transferwee.py: https://github.com/iamleot/transferwee -#========================================================================================================================= - -if [ $# -eq 0 ]; then - echo "Usage: python3 transferwee.py FILE\n" - exit 1 -fi - -FILE=$1 - -if [ ! -f "$FILE" ]; then - echo "File ${FILE} not found" - exit 1 -fi - -RESPONSE=$(python3 ${ROOT_PATH}/scripts/services/transferwee.py upload "${FILE}") - -echo "${RESPONSE}" # to terminal