From 433a5c655780644a33d1b05bdcbd5b22cded9f11 Mon Sep 17 00:00:00 2001 From: waltje Date: Wed, 18 Apr 2018 02:28:16 -0400 Subject: [PATCH] More fixes for the upload process. --- .travis-build.sh | 4 ++++ .travis-deploy.sh | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.travis-build.sh b/.travis-build.sh index b1cfa1e..0c4e396 100644 --- a/.travis-build.sh +++ b/.travis-build.sh @@ -57,6 +57,10 @@ cd src + # We only need the first few characters of the commit ID. + export COMMIT=${TRAVIS_COMMIT::7} + + # Build the project. make -f win/mingw/Makefile.MinGW BUILD=${TRAVIS_BUILD_NUMBER} if [ $? = 0 ]; then diff --git a/.travis-deploy.sh b/.travis-deploy.sh index efe1d5f..5e86228 100644 --- a/.travis-deploy.sh +++ b/.travis-deploy.sh @@ -46,7 +46,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Ignore the cron builds. - [ $TRAVIS_EVENT_TYPE = "cron" ] && exit 0 + [ "x${TRAVIS_EVENT_TYPE}" = "xcron" ] && exit 0 [ "x${DEBUG}" = "xy" ] && TARGET=debug if [ "x${DEV_BUILD}" = "xy" ]; then @@ -66,12 +66,15 @@ exit 1 fi + # We only need the first few characters of the commit ID. + export COMMIT=${TRAVIS_COMMIT::7} + echo "Uploading VARCem build #${TRAVIS_BUILD_NUMBER} target ${TARGET}" curl -# -X POST \ -F "type=${BTYPE}" \ -F "build=${TRAVIS_BUILD_NUMBER}" \ - -F "id=${TRAVIS_COMMIT}" \ + -F "id=${COMMIT}" \ -F "notes=not available" \ -F "file_name=@${TARGET}.zip" \ ${SITE_URL}