Skip to content

Commit

Permalink
trim out /all/repo too
Browse files Browse the repository at this point in the history
  • Loading branch information
nickboldt committed Mar 6, 2015
1 parent 0b9eac8 commit 9f258af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion publish/rsync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ rsync -arzq --protocol=28 ${SOURCE_PATH}/* $DESTINATION/${TARGET_PATH}/
# for published builds on download.jboss.org ONLY!
# regenerate http://download.jboss.org/jbosstools/builds/${TARGET_PATH}/composite*.xml files for up to 5 builds, cleaning anything older than 5 days old
if [[ ${TARGET_PATH/builds/} != ${TARGET_PATH} ]] && [[ ${DESTINATION} = "tools@filemgmt.jboss.org:/downloads_htdocs/tools" ]] && [[ -f ${WORKSPACE}/sources/util/cleanup/jbosstools-cleanup.sh ]]; then
PARENT_PATH=${TARGET_PATH:0:-1}; PARENT_PATH=${PARENT_PATH%/*} # trim last character (could be a /) then remove last path seg
PARENT_PATH=${TARGET_PATH:0:-1}; PARENT_PATH=${PARENT_PATH/\/all\/repo/}; PARENT_PATH=${PARENT_PATH%/*} # trim last character (could be a /) then remove /all/repo, then last path seg (eg., B646-2015-03-06_17-55-14)
# should end up with /downloads_htdocs/tools/mars/snapshots/builds/jbosstools-base_master/
. ${WORKSPACE}/sources/util/cleanup/jbosstools-cleanup.sh --keep 5 --age-to-delete 5 --childFolderSuffix /all/repo/ -d ${PARENT_PATH}
fi

Expand Down

0 comments on commit 9f258af

Please sign in to comment.