@@ -34,31 +34,18 @@ cd $JETPACK_SVN_DIR
34
34
svn up trunk
35
35
svn up tags --depth=empty
36
36
37
- # Delete files in the SVN repo that are no longer in the Git repo.
38
- SVN_FILES=$( cd trunk && find . -type f )
39
- GIT_FILES=$( cd $JETPACK_GIT_DIR && find . -type f )
40
- RM_FILES=$( diff -B <( echo " $SVN_FILES " ) <( echo " $GIT_FILES " ) | grep " ^<.*" | cut -d ' ' -f 2 )
41
- if [ -z " $RM_FILES " ]; then
42
- echo " No deleted files."
43
- else
44
- for THIS_FILE in $RM_FILES
45
- do
46
- ( cd trunk && svn rm $THIS_FILE )
47
- echo " Removed $THIS_FILE to match source."
48
- done
49
- fi
50
-
51
- # Copy our whole git checkout here recursively.
52
- cp -rf $JETPACK_GIT_DIR /* trunk
53
-
54
- # Snag the dot-files as well.
55
- cp -rf $JETPACK_GIT_DIR /.??* trunk
56
-
57
- # Delete files that don't need to be deployed with the plugin release.
58
- rm -rf trunk/.git trunk/.gitignore trunk/.jshintrc trunk/.jshintignore trunk/.sass-cache trunk/Gruntfile.js trunk/_inc/scss trunk/_inc/* .scss trunk/.travis.yml trunk/package.json trunk/languages/jetpack.pot trunk/phpunit.xml.dist trunk/readme.md trunk/node_modules trunk/tests trunk/tools
59
-
60
- # Upcoming Events isn't ready for primetime yet.
61
- rm -rf trunk/_inc/lib/icalendar-reader.php trunk/modules/shortcodes/upcoming-events.php trunk/modules/widgets/upcoming-events.php
37
+ # delete everything except .svn dirs
38
+ for file in $( find $JETPACK_SVN_DIR /trunk/* -not -path " *.svn*" ) ; do
39
+ rm $file 2> /dev/null
40
+ done
41
+
42
+ # copy everything over from git
43
+ rsync -r --exclude=' *.git*' $JETPACK_GIT_DIR /* $JETPACK_SVN_DIR /trunk
44
+
45
+ # check .svnignore
46
+ for file in $( cat " $JETPACK_GIT_DIR /.svnignore" 2> /dev/null ) ; do
47
+ rm trunk/$file -rf
48
+ done
62
49
63
50
# Tag the release.
64
51
# svn cp trunk tags/$TAG
0 commit comments