Skip to content

Commit

Permalink
Add delete option to rsync to remove legacy dirs from trunk and distrib
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Foti <[email protected]>
  • Loading branch information
MocioF committed Jul 29, 2024
1 parent 7fa8b93 commit b13003d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,15 @@ svnsync() {
# we don't sync vendor if the lock file is the same
shasum "$SVN_PATH/trunk/composer.lock"
shasum "$OUTPUT_PATH/composer.lock"
if [[ $(shasum "$SVN_PATH/trunk/composer.lock" | head -c 40) == $(shasum "$OUTPUT_PATH/composer.lock" | head -c 40) ]]; then
rsync -q -av $OUTPUT_PATH/* $SVN_PATH/trunk --exclude vendor
echo "## no differences in /vendor, similar lock files ##"
else
rsync -q -av $OUTPUT_PATH/* $SVN_PATH/trunk
fi

#if [[ $(shasum "$SVN_PATH/trunk/composer.lock" | head -c 40) == $(shasum "$OUTPUT_PATH/composer.lock" | head -c 40) ]]; then
# rsync -q -av --delete --delete-excluded --delete-before $OUTPUT_PATH/ $SVN_PATH/trunk --exclude vendor
# echo "## no differences in /vendor, similar lock files ##"
#else
rsync -q -av --delete --delete-excluded --delete-before $OUTPUT_PATH/ $SVN_PATH/trunk
#fi
tree -L 3 "$SVN_PATH"
(cd $SVN_PATH && svn add --force . && svn diff && svn stat)
tree -L 3 "$SVN_PATH"
}

svnpush() {
Expand Down

0 comments on commit b13003d

Please sign in to comment.