From 3136151c657a696ed0937d0600284b2d137ad828 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Fri, 26 Jan 2018 18:44:45 +0100 Subject: travis: build: use new distfile deployment service --- .travis/deploy.sh | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.travis/deploy.sh b/.travis/deploy.sh index 350a400..d9ccc0a 100755 --- a/.travis/deploy.sh +++ b/.travis/deploy.sh @@ -35,13 +35,21 @@ deploy TARNAME="$(grep PACKAGE_TARNAME build/config.h | cut -d\" -f2)" VERSION="$(grep PACKAGE_VERSION build/config.h | cut -d\" -f2)" +do_sha512() { + pushd "$(dirname ${1})" > /dev/null + sha512sum "$(basename ${1})" + popd > /dev/null +} + do_curl() { curl \ --silent \ - --ftp-create-dirs \ - --upload-file "${1}" \ - --user "${FTP_USER}:${FTP_PASSWORD}" \ - "ftp://${FTP_HOST}/public_html/${TARNAME}/${TARNAME}-${VERSION}/$(basename ${1})" + --form "project=${TARNAME}" \ + --form "version=${VERSION}" \ + --form "file=@${1}" \ + --form "sha512=$(do_sha512 ${1})" \ + "${DISTFILES_URL}" \ + &> /dev/null # make sure that we don't leak tokens } echo " * Found files:" @@ -53,19 +61,9 @@ echo for f in "${FILES[@]}"; do echo " * Processing file: $(basename ${f}):" - echo -n " Generating SHA512 checksum ... " - pushd "$(dirname ${f})" > /dev/null - sha512sum "$(basename ${f})" > "$(basename ${f}).sha512" - popd > /dev/null - echo "done" - echo -n " Uploading file ... " do_curl "${f}" echo "done" - echo -n " Uploading SHA512 checksum ... " - do_curl "${f}.sha512" - echo "done" - echo done -- cgit v1.2.3-18-g5258