Skip to content

Commit 68f4332

Browse files
committed
try chunking the deploy another way
1 parent dfc6e57 commit 68f4332

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

scripts/deploy.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,25 +91,31 @@ tar -xf "matomo-$VERSION.tgz" --directory="$TMP_DIR" # the archive is created vi
9191

9292
cd "$SVN_DIR"
9393

94-
# Copy from clean copy to /trunk, excluding dotorg assets
95-
# The --delete flag will delete anything in destination that no longer exists in source
96-
rsync -rc "$TMP_DIR/" trunk --delete --delete-excluded
97-
9894
# Copy dotorg assets to /assets
9995
rsync -rc "$GITHUB_WORKSPACE/$ASSETS_DIR/" assets/ --delete --delete-excluded
10096

10197
# Add everything and commit to SVN (in chunks in case there's too many changes in Matomo core)
10298
PIECES=(app/core app/plugins app/vendor app .)
10399
for chunk in ${PIECES[@]}; do
104-
if [[ ! -d "trunk/$chunk" ]]; then
100+
# Copy from clean copy to /trunk, excluding dotorg assets
101+
# The --delete flag will delete anything in destination that no longer exists in source
102+
RSYNC_FROM="$TMP_DIR/$chunk/"
103+
RSYNC_TO="trunk/$chunk"
104+
if [[ "$chunk" == "." ]]; then
105+
RSYNC_FROM="$TMP_DIR/"
106+
RSYNC_TO="trunk"
107+
fi
108+
rsync -rc RSYNC_FROM RSYNC_TO --delete --delete-excluded
109+
110+
if [[ ! -d "trunk/$chunk" ]]; then # sanity check
105111
echo "➤ ERROR: '$chunk' folder does not exist"
106112
exit 1;
107113
fi
108114

109115
# The force flag ensures we recurse into subdirectories even if they are already added
110116
# Suppress stdout in favor of svn status later for readability
111117
echo "➤ Preparing files ($chunk)..."
112-
svn add "trunk/$chunk" --force # > /dev/null
118+
svn add . --force # > /dev/null
113119

114120
# SVN delete all deleted files
115121
# Also suppress stdout here

0 commit comments

Comments
 (0)