Skip to content

Commit

Permalink
Merge pull request #3178 from caskdata/feature/port_develop_changes
Browse files Browse the repository at this point in the history
port changes to release_3_0
  • Loading branch information
duddun committed Jul 15, 2015
2 parents a1dc128 + 2ae4f40 commit cfb9d03
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cdap-distributions/bin/build_artifact_upload.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ function sync_build_artifacts_to_server () {
decho "version stub=${_version_stub}"
_version=`echo ${_version_stub} | awk -F - '{ print $1 }' | awk -F . '{ print $1"."$2"."$3 }'`
decho "version = ${_version}"
_snapshot_time=`echo ${_version_stub} | awk -F - '{ print $1 }' | sed 's/\([0-9]\.[0-9]\.[0-9]\)\.\([0-9]*\)/\2/'`
_snapshot_time=`echo ${_version_stub} | awk -F - '{ print $1 }' | sed 's/[0-9]\.[0-9]\.[0-9][\.]*\([0-9]*\)/\1/'`
if [ "${_version}" == ${_snapshot_time} ]; then
_snapshot_time=''
fi
decho "snapshot time = ${_snapshot_time}"

# identify and create remote incoming directory
if [ "${_snapshot_time}" == '' ]; then
Expand All @@ -128,8 +132,8 @@ function sync_build_artifacts_to_server () {
ssh -l ${REMOTE_USER} ${REMOTE_HOST} "mkdir -p ${REMOTE_INCOMING_DIR}/${OUTGOING_DIR}" || die "could not create remote directory"

# sync package(s) to remote server
decho "rsyncing with rsync -av -e \"ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null\" ${RSYNC_QUIET} ${i} ${REMOTE_BASE_DIR}/${OUTGOING_DIR} ${DRY_RUN} 2>&1"
rsync -av -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ${RSYNC_QUIET} ${i} ${REMOTE_BASE_DIR}/${OUTGOING_DIR} ${DRY_RUN} 2>&1 || die "could not rsync ${_package} as ${REMOTE_USER} to ${REMOTE_HOST}: ${!}"
decho "rsyncing with rsync -av -e \"ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null\" ${RSYNC_QUIET} ${i} ${REMOTE_BASE_DIR}/${OUTGOING_DIR}/ ${DRY_RUN} 2>&1"
rsync -av -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ${RSYNC_QUIET} ${i} ${REMOTE_BASE_DIR}/${OUTGOING_DIR}/ ${DRY_RUN} 2>&1 || die "could not rsync ${_package} as ${REMOTE_USER} to ${REMOTE_HOST}: ${!}"
decho ""
done
}
Expand Down

0 comments on commit cfb9d03

Please sign in to comment.