Skip to content

Commit b684022

Browse files
committed
use the plugin path in the script
1 parent 34a2528 commit b684022

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/validate-plugin-version.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ main(){
1212
PLUGIN_PATH=$(pwd)
1313
echo "Plugin path: $PLUGIN_PATH"
1414
fi
15-
15+
1616
local CURRENT_WP_VERSION
1717
CURRENT_WP_VERSION=$(curl -s https://api.wordpress.org/core/version-check/1.7/ | jq -r '.offers[0].current')
1818
echo "Current WordPress Version: ${CURRENT_WP_VERSION}"
1919

2020
# Get "Tested up to" version from readme.txt
21-
if [[ -f "readme.txt" ]]; then
21+
if [[ -f "${PLUGIN_PATH}/readme.txt" ]]; then
2222
TESTED_UP_TO=$(grep -i "Tested up to:" readme.txt | tr -d '\r\n' | awk -F ': ' '{ print $2 }')
2323
else
2424
echo "readme.txt not found."
@@ -40,7 +40,7 @@ main(){
4040
sed -i '' -E "s/(Tested up to: ).*/\1$CURRENT_WP_VERSION/" readme.txt
4141

4242
# Update README.md if it exists
43-
if [[ -f "README.md" ]]; then
43+
if [[ -f "${PLUGIN_PATH}/README.md" ]]; then
4444
sed -i '' -E "s/(Tested up to: ).*/\1$CURRENT_WP_VERSION/" README.md
4545
echo "README.md updated with new Tested up to version."
4646
fi

0 commit comments

Comments
 (0)