Skip to content

Commit 2311fb7

Browse files
Address review feedback
1 parent f484e0e commit 2311fb7

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ 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-
* `DRY_RUN` - defaults to `false`. Set `true` to skip the final commit step and check all the debugging processes.
2726

2827
### Inputs
29-
* `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.
28+
* `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`.
29+
* `dry-run` - Set `true` to skip the final commit step and check all the debugging processes. Defaults to `false`.
3030

3131
### Outputs
3232
* `zip-path` - The path to the ZIP file generated if `generate-zip` is set to `true`. Fully qualified including the filename, intended for use in further workflow steps such as uploading release assets.

deploy.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,8 @@ 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"
23+
if $DRY_RUN; then
24+
echo "ℹ︎ Dry run: no files will be committed to subversion."
3025
fi
3126

3227
# Allow some ENV variables to be customized
@@ -161,8 +156,8 @@ svn update
161156

162157
svn status
163158

164-
if [[ "$DRY_RUN" == true ]]; then
165-
echo "Debug mode: Files not committed."
159+
if $DRY_RUN; then
160+
echo "Dry run: Files not committed."
166161
else
167162
echo "➤ Committing files..."
168163
svn commit -m "Update to version $VERSION from GitHub" --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"

0 commit comments

Comments
 (0)