Skip to content

Commit 98708c7

Browse files
authored
Refactor publish script for WordPress theme
Updated rsync command and added SVN delete and add commands.
1 parent ad62a65 commit 98708c7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/scripts/publish-theme-to-wordpress-org-dry-run.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ mkdir -p "$VERSION_DIR"
5353
cd "$VERSION_DIR"
5454

5555
echo "Copy files from build directory"
56-
rsync -ah --progress "$THEME_PATH/hello-elementor/"* . || rsync -ah --progress "$THEME_PATH/hello-elementor/." . || true
56+
rsync -ah --progress "$THEME_PATH/hello-elementor/"* .
57+
58+
echo "svn delete"
59+
svn status | grep -v '^.[ \t]*\\..*' | { grep '^!' || true; } | awk '{print $2}' | xargs -r svn delete;
60+
61+
echo "svn add"
62+
svn status | grep -v '^.[ \t]*\\..*' | { grep '^?' || true; } | awk '{print $2}' | xargs -r svn add;
5763

5864
echo "Print SVN Status changes"
5965
svn status

0 commit comments

Comments
 (0)