Skip to content

Commit 40d54a6

Browse files
committed
version 2.0.10 released
1 parent 703298e commit 40d54a6

File tree

80 files changed

+2054
-5136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2054
-5136
lines changed

.github/workflows/deploy.yml

Lines changed: 40 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,12 @@ jobs:
2323
- name: Find Readme File
2424
id: find_readme
2525
run: |
26-
for file in readme.txt Readme.txt README.txt README.md Readme.md readme.md; do
27-
if [ -f "$file" ]; then
28-
echo "Readme file found: $file"
29-
echo "readme_file=$file" >> $GITHUB_ENV
30-
break
31-
fi
32-
done
33-
34-
# Ensure the variable is available within the current step
35-
source $GITHUB_ENV
36-
37-
if [ -z "$readme_file" ]; then
26+
#readme_file=$(find . -type f -iname "readme.*" | head -n 1)
27+
readme_file=$(find . -maxdepth 1 -type f -iname "readme.txt" | head -n 1)
28+
if [ -n "$readme_file" ]; then
29+
echo "Readme file found: $readme_file"
30+
echo "readme_file=$readme_file" >> $GITHUB_ENV
31+
else
3832
echo "::error::Readme file not found."
3933
exit 1
4034
fi
@@ -43,78 +37,58 @@ jobs:
4337
id: release_notes
4438
run: |
4539
changelog_section_start="== Changelog =="
46-
readme_file="$readme_file"
40+
current_tag="${{ github.ref_name }}"
41+
readme_file="${{ env.readme_file }}"
4742
48-
# Extract the tag name from GITHUB_REF (plugin_version)
49-
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
50-
plugin_version="${GITHUB_REF#refs/tags/}"
51-
echo "DEBUG: Plugin latest version found: $plugin_version."
52-
else
53-
echo "::error::This workflow must be triggered by a tag push."
54-
exit 1
55-
fi
43+
# Extract the version (strip 'refs/tags/' if it exists)
44+
version=${current_tag#refs/tags/}
5645
46+
# Read lines from the changelog section
5747
in_changelog=0
58-
found_version=0
5948
release_notes=""
60-
61-
echo "DEBUG: Starting to extract release notes from $readme_file for version $plugin_version."
62-
49+
capturing_version=0
6350
while IFS= read -r line; do
64-
echo "DEBUG: Processing line: $line"
65-
66-
# Start processing after the changelog header
51+
# Start capturing after finding the changelog section
6752
if [[ "$line" == "$changelog_section_start" ]]; then
6853
in_changelog=1
69-
echo "DEBUG: Found changelog section header."
7054
continue
7155
fi
7256
73-
# Skip if not in changelog section
74-
if [[ $in_changelog -eq 0 ]]; then
75-
echo "DEBUG: Skipping line (not in changelog section)."
76-
continue
57+
# Stop capturing if we encounter a new version or the end of the file
58+
if [[ $in_changelog -eq 1 && "$line" =~ ^= ]]; then
59+
# Check if this is the current version
60+
if [[ "$line" == "= $version =" ]]; then
61+
capturing_version=1
62+
elif [[ $capturing_version -eq 1 ]]; then
63+
# Stop if we see the next version
64+
break
65+
fi
7766
fi
7867
79-
# Check for the current version header
80-
if [[ "$line" == "= ${plugin_version} =" ]]; then
81-
found_version=1
82-
echo "DEBUG: Found version header for $plugin_version."
83-
continue
84-
fi
85-
86-
# Break if a new version header is found after the current version
87-
if [[ $found_version -eq 1 ]] && echo "$line" | grep -qE '^= [0-9]+\.[0-9]+\.[0-9]+ =$'; then
88-
echo "DEBUG: Found a new version header. Stopping collection."
89-
break
90-
fi
91-
92-
# Collect lines starting with '*' if we are in the current version section
93-
if [[ $found_version -eq 1 ]] && echo "$line" | grep -qE '^\*'; then
94-
echo "DEBUG: Found changelog entry: $line"
95-
release_notes+="${line}\n"
96-
continue
97-
fi
98-
99-
# Log skipped lines in the current version section
100-
if [[ $found_version -eq 1 ]]; then
101-
echo "DEBUG: Skipping line (not a changelog entry): $line"
68+
# Capture lines only for the current version
69+
if [[ $capturing_version -eq 1 && -n "$line" ]]; then
70+
release_notes+="$line\n"
10271
fi
10372
done < "$readme_file"
10473
10574
if [[ -z "$release_notes" ]]; then
106-
echo "::error::Failed to extract release notes for version ${plugin_version}."
75+
echo "::error::Failed to extract release notes for version $version."
10776
exit 1
10877
fi
10978
110-
echo "DEBUG: Successfully extracted release notes."
111-
echo "DEBUG: Release notes content:"
112-
echo -e "$release_notes"
79+
# Debug: Print extracted release notes
80+
echo "Extracted release notes for version $version:"
81+
printf "%b" "$release_notes"
11382
114-
# Write the release notes with actual line breaks
115-
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
116-
echo -e "$release_notes" >> $GITHUB_ENV
117-
echo "EOF" >> $GITHUB_ENV
83+
# Set output (fixed, now using Environment File)
84+
echo "notes<<EOF" >> $GITHUB_OUTPUT
85+
printf "%b\n" "$release_notes" >> $GITHUB_OUTPUT
86+
echo "EOF" >> $GITHUB_OUTPUT
87+
88+
- name: Debug Release Notes
89+
run: |
90+
echo "Debugging Release Notes:"
91+
echo "${{ steps.release_notes.outputs.notes }}"
11892
11993
- name: WordPress Plugin Deploy
12094
id: deploy
@@ -126,10 +100,10 @@ jobs:
126100
uses: softprops/action-gh-release@v2
127101
with:
128102
tag_name: ${{ github.ref_name }}
129-
body: ${{ env.RELEASE_NOTES }}
103+
body: ${{ steps.release_notes.outputs.notes }}
130104
files: ${{github.workspace}}/${{ github.event.repository.name }}.zip
131105

132106
env:
133107
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
134108
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
135-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: wordpress smtp,wordpress email log,smtp
44
Requires at least: 5.3
55
Requires PHP: 8.2
66
Tested up to: 6.8
7-
Stable tag: 2.0.9
7+
Stable tag: 2.0.10
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1010

@@ -117,6 +117,13 @@ e.g.
117117

118118

119119
== Changelog ==
120+
= 2.0.10 =
121+
* [updated] Pro addon V1.0.7 released
122+
* [fixed] Composer platform check issue fixed
123+
* [fixed] Custom db connect issue solved if mysql port not default
124+
* [improvement] DB Table name escape improved
125+
* [updated] Plugin Check V1.7.0 compatible
126+
120127
= 2.0.9 =
121128
* [fixed] Fixed method callback for 'custom_robots_txt'
122129

0 commit comments

Comments
 (0)