Skip to content

Commit f484e0e

Browse files
Address review feedback
1 parent 119f3a1 commit f484e0e

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This Action commits the contents of your Git tag to the WordPress.org plugin rep
2323
* `VERSION` - defaults to the tag name; do not recommend setting this except for testing purposes.
2424
* `ASSETS_DIR` - defaults to `.wordpress-org`, customizable for other locations of WordPress.org plugin repository-specific assets that belong in the top-level `assets` directory (the one on the same level as `trunk`).
2525
* `BUILD_DIR` - defaults to `false`. Set this flag to the directory where you build your plugins files into, then the action will copy and deploy files from that directory. Both absolute and relative paths are supported. The relative path if provided will be concatenated with the repository root directory. All files and folders in the build directory will be deployed, `.disignore` or `.gitattributes` will be ignored.
26-
* `DEBUG` - defaults to `false`. Set `true` to skip the final commit step and check all the debugging processes.
26+
* `DRY_RUN` - defaults to `false`. Set `true` to skip the final commit step and check all the debugging processes.
2727

2828
### Inputs
2929
* `generate-zip` - Generate a ZIP file from the SVN `trunk` directory. Outputs a `zip-path` variable for use in further workflow steps. Defaults to false.

deploy.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ if [[ -z "$SVN_PASSWORD" ]]; then
2020
exit 1
2121
fi
2222

23+
# Check if the DRY_RUN ENV variable is set, otherwise set it to false.
24+
if [[ -z "$DRY_RUN" ]]; then
25+
DRY_RUN=false;
26+
fi
27+
28+
if [[ "$DRY_RUN" == true ]]; then
29+
echo "ℹ︎ DRY_RUN is true"
30+
fi
31+
2332
# Allow some ENV variables to be customized
2433
if [[ -z "$SLUG" ]]; then
2534
SLUG=${GITHUB_REPOSITORY#*/}
@@ -152,11 +161,11 @@ svn update
152161

153162
svn status
154163

155-
if [[ "$DEBUG" != false ]]; then
164+
if [[ "$DRY_RUN" == true ]]; then
165+
echo "➤ Debug mode: Files not committed."
166+
else
156167
echo "➤ Committing files..."
157168
svn commit -m "Update to version $VERSION from GitHub" --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
158-
else
159-
echo "➤ Debug mode: Files not committed."
160169
fi
161170

162171
if $INPUT_GENERATE_ZIP; then

0 commit comments

Comments
 (0)