File tree Expand file tree Collapse file tree 3 files changed +8
-118
lines changed
Expand file tree Collapse file tree 3 files changed +8
-118
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -46,26 +46,26 @@ if svn list "https://themes.svn.wordpress.org/hello-elementor/${VERSION_DIR}" >
4646fi
4747
4848mkdir -p " $VERSION_DIR "
49- cd " $VERSION_DIR "
50- cd ..
5149svn add " $VERSION_DIR "
5250cd " $VERSION_DIR "
5351
54- echo " Copy files"
52+ echo " Copy files from build directory "
5553rsync -ah --progress " $THEME_PATH /hello-elementor/" * . || rsync -ah --progress " $THEME_PATH /hello-elementor/." . || true
5654
57- echo " Preparing files"
58- cd " $VERSION_DIR "
55+ echo " Preparing files for SVN"
56+
57+ echo " svn delete"
58+ svn status | grep -v ' ^\?[ \t]*\.$' | { grep ' ^!' || true ; } | awk ' {print $2}' | xargs -r svn delete || true
5959
6060echo " svn add"
61- svn status | grep -v ' ^. [ \t]*\\..* ' | { grep ' ^?' || true ; } | awk ' {print $2}' | xargs -r svn add || true
61+ svn status | grep -v ' ^\? [ \t]*\.$ ' | { grep ' ^?' || true ; } | awk ' {print $2}' | xargs -r svn add || true
6262
6363svn status
6464
65+ cd $SVN_PATH
66+
6567echo " Commit files to version folder $VERSION_DIR "
6668svn ci -m " Upload v${THEME_VERSION} " --no-auth-cache --non-interactive --username " $SVN_USERNAME " --password " $SVN_PASSWORD "
67-
68- cd $SVN_PATH
6969svn update
7070
7171echo " Remove the SVN folder from the workspace"
Original file line number Diff line number Diff line change @@ -6,12 +6,6 @@ permissions:
66
77on :
88 workflow_dispatch :
9- inputs :
10- dry_run :
11- type : boolean
12- description : ' Dry run mode (test without deploying)'
13- required : false
14- default : false
159
1610jobs :
1711 build :
@@ -50,19 +44,13 @@ jobs:
5044 sudo apt-get install -y subversion
5145 which svn
5246 svn --version
53- - name : Publish to WordPress.org SVN (Dry Run)
54- if : ${{ inputs.dry_run == true }}
55- run : |
56- bash "${GITHUB_WORKSPACE}/.github/scripts/publish-theme-to-wordpress-org-dry-run.sh"
5747 - name : Publish to WordPress.org SVN
58- if : ${{ inputs.dry_run == false }}
5948 env :
6049 SVN_USERNAME : ${{ secrets.SVN_USERNAME }}
6150 SVN_PASSWORD : ${{ secrets.SVN_PASSWORD }}
6251 run : |
6352 bash "${GITHUB_WORKSPACE}/.github/scripts/publish-theme-to-wordpress-org.sh"
6453 - name : Send Slack Notification
65- if : ${{ inputs.dry_run == false }}
6654 uses : ./.github/actions/theme-slack-notification-release
6755 with :
6856 CLOUD_SLACK_BOT_TOKEN : ${{ secrets.CLOUD_SLACK_BOT_TOKEN }}
You can’t perform that action at this time.
0 commit comments