From 15861ef6ea568b144821ed7bdd8ef46a5425fc5c Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Sun, 15 Sep 2013 00:54:43 -0700 Subject: [PATCH] Update binary uploading process - fix commit name for OSX & Windows - fix NOW to use specific time zone, PST - upload compressed binary for archiving --- .travis.osx.yml | 8 ++++---- .travis.windows.yml | 6 +++--- .travis.yml | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.osx.yml b/.travis.osx.yml index a7d2e6306..14430f6ea 100644 --- a/.travis.osx.yml +++ b/.travis.osx.yml @@ -42,16 +42,16 @@ after_script: - if [[ $UPLOAD ]]; then UPLOAD_DIR=bin; BINARY=lean_${UPLOAD}; - NOW=`date +"%Y%m%d_%H%M"`; - GIT_COMMIT=`git log --oneline -n 1 | cut -d ' ' -f 1`; + NOW=`TZ='America/Los_Angeles' date +"%Y%m%d_%H%M"`; + GIT_COMMIT=`git log HEAD~ --oneline -n 1 | cut -d ' ' -f 1`; OS=osx; ARCHIVE_BINARY=${NOW}_${TRAVIS_BRANCH}_${GIT_COMMIT}_${OS}_${CMAKE_CXX_COMPILER}_${BUILD_TYPE}; if [[ $USE_TCMALLOC ]]; then ARCHIVE_BINARY=${ARCHIVE_BINARY}_tcmalloc; fi; mkdir ${UPLOAD_DIR}; - cp build/shell/lean ${UPLOAD_DIR}/${BINARY}; - cp build/shell/lean ${UPLOAD_DIR}/${ARCHIVE_BINARY}; + cp -v build/shell/lean ${UPLOAD_DIR}/${BINARY}; + tar cvfz ${UPLOAD_DIR}/${ARCHIVE_BINARY}.tar.gz ${UPLOAD_DIR}/${BINARY}; script/dropbox_upload.py --srcpath ${UPLOAD_DIR} --destpath /Public/${UPLOAD_DIR} --dropbox-token ${DROPBOX_KEY}; fi - cd build diff --git a/.travis.windows.yml b/.travis.windows.yml index 3f7b99ab8..46b9ef0e3 100644 --- a/.travis.windows.yml +++ b/.travis.windows.yml @@ -52,8 +52,8 @@ after_script: - if [[ $UPLOAD ]]; then UPLOAD_DIR=bin; BINARY=lean_${UPLOAD}; - NOW=`date +"%Y%m%d_%H%M"`; - GIT_COMMIT=`git log --oneline -n 1 | cut -d ' ' -f 1`; + NOW=`TZ='America/Los_Angeles' date +"%Y%m%d_%H%M"`; + GIT_COMMIT=`git log HEAD~ --oneline -n 1 | cut -d ' ' -f 1`; OS=windows; ARCHIVE_BINARY=${NOW}_${TRAVIS_BRANCH}_${GIT_COMMIT}_${OS}_${CMAKE_CXX_COMPILER}_${BUILD_TYPE}; if [[ $USE_TCMALLOC ]]; then @@ -61,7 +61,7 @@ after_script: fi; mkdir ${UPLOAD_DIR}; cp build/shell/lean.exe ${UPLOAD_DIR}/${BINARY}.exe; - cp build/shell/lean.exe ${UPLOAD_DIR}/${ARCHIVE_BINARY}.exe; + tar cvfz ${UPLOAD_DIR}/${ARCHIVE_BINARY}.tar.gz ${UPLOAD_DIR}/${BINARY}.exe; script/dropbox_upload.py --srcpath ${UPLOAD_DIR} --destpath /Public/${UPLOAD_DIR} --dropbox-token ${DROPBOX_KEY}; fi diff --git a/.travis.yml b/.travis.yml index 96b9fa3bf..975e9a918 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,7 +97,7 @@ install: - if [[ $LEANREPO == BLESSED && $MEMCHECK == TRUE ]]; then sudo apt-get -qq install valgrind; fi - - if [[ $LEANREPO == BLESSED && ($UPLOAD == TRUE || $BUILD_DOXYGEN == TRUE) ]]; then + - if [[ $LEANREPO == BLESSED && ($UPLOAD || $BUILD_DOXYGEN == TRUE) ]]; then sudo apt-get -qq install python python-pip; sudo pip install dropbox; fi @@ -187,7 +187,7 @@ after_script: - if [[ $LEANREPO == BLESSED && $UPLOAD ]]; then UPLOAD_DIR=bin; BINARY=lean_${UPLOAD}; - NOW=`date +"%Y%m%d_%H%M"`; + NOW=`TZ='America/Los_Angeles' date +"%Y%m%d_%H%M"`; GIT_COMMIT=`git log --oneline -n 1 | cut -d ' ' -f 1`; OS=linux; ARCHIVE_BINARY=${NOW}_${TRAVIS_BRANCH}_${GIT_COMMIT}_${OS}_${CMAKE_CXX_COMPILER}_${BUILD_TYPE}; @@ -196,7 +196,7 @@ after_script: fi; mkdir ${UPLOAD_DIR}; cp -v build/shell/lean ${UPLOAD_DIR}/${BINARY}; - cp -v build/shell/lean ${UPLOAD_DIR}/${ARCHIVE_BINARY}; + tar cvfz ${UPLOAD_DIR}/${ARCHIVE_BINARY}.tar.gz ${UPLOAD_DIR}/${BINARY}; script/dropbox_upload.py --srcpath ${UPLOAD_DIR} --destpath /Public/${UPLOAD_DIR} --dropbox-token ${DROPBOX_KEY}; fi