@@ -91,25 +91,31 @@ tar -xf "matomo-$VERSION.tgz" --directory="$TMP_DIR" # the archive is created vi
91
91
92
92
cd " $SVN_DIR "
93
93
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
-
98
94
# Copy dotorg assets to /assets
99
95
rsync -rc " $GITHUB_WORKSPACE /$ASSETS_DIR /" assets/ --delete --delete-excluded
100
96
101
97
# Add everything and commit to SVN (in chunks in case there's too many changes in Matomo core)
102
98
PIECES=(app/core app/plugins app/vendor app .)
103
99
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
105
111
echo " ➤ ERROR: '$chunk ' folder does not exist"
106
112
exit 1;
107
113
fi
108
114
109
115
# The force flag ensures we recurse into subdirectories even if they are already added
110
116
# Suppress stdout in favor of svn status later for readability
111
117
echo " ➤ Preparing files ($chunk )..."
112
- svn add " trunk/ $chunk " --force # > /dev/null
118
+ svn add . --force # > /dev/null
113
119
114
120
# SVN delete all deleted files
115
121
# Also suppress stdout here
0 commit comments