Skip to content

Commit 34a2528

Browse files
committed
add plugin path to script
1 parent 8508d22 commit 34a2528

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

bin/validate-plugin-version.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,16 @@ set -euo pipefail
33
IFS=$'\n\t'
44

55
main(){
6-
6+
# If $PLUGIN_PATH is defined, echo it.
7+
if [[ -n "${PLUGIN_PATH:-}" ]]; then
8+
echo "Plugin path: $PLUGIN_PATH"
9+
else
10+
local PLUGIN_PATH
11+
# By default, the plugin path is the root directory of the project that has this action.
12+
PLUGIN_PATH=$(pwd)
13+
echo "Plugin path: $PLUGIN_PATH"
14+
fi
15+
716
local CURRENT_WP_VERSION
817
CURRENT_WP_VERSION=$(curl -s https://api.wordpress.org/core/version-check/1.7/ | jq -r '.offers[0].current')
918
echo "Current WordPress Version: ${CURRENT_WP_VERSION}"

0 commit comments

Comments
 (0)