Skip to content

Commit a9a4952

Browse files
committed
version 2.0.3 released
1 parent 4aeeb36 commit a9a4952

21 files changed

+632
-339
lines changed

.github/workflows/deploy.yml

Lines changed: 93 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,46 +11,125 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3
14+
15+
- name: Debug File List
16+
run: ls -R
17+
1418
- name: Install SVN (Subversion)
1519
run: |
1620
sudo apt-get update
1721
sudo apt-get install subversion
1822
19-
- name: WordPress Plugin Deploy
20-
id: deploy
21-
uses: 10up/action-wordpress-plugin-deploy@stable
22-
with:
23-
generate-zip: true
24-
2523
- name: Find Readme File
2624
id: find_readme
2725
run: |
28-
for file in README.txt README.md Readme.txt Readme.md readme.txt readme.md; do
26+
for file in readme.txt Readme.txt README.txt README.md Readme.md readme.md; do
2927
if [ -f "$file" ]; then
30-
echo "::set-output name=readme_file::$file"
28+
echo "Readme file found: $file"
29+
echo "readme_file=$file" >> $GITHUB_ENV
3130
break
3231
fi
3332
done
3433
34+
# Ensure the variable is available within the current step
35+
source $GITHUB_ENV
36+
37+
if [ -z "$readme_file" ]; then
38+
echo "::error::Readme file not found."
39+
exit 1
40+
fi
41+
3542
- name: Extract Release Notes
3643
id: release_notes
3744
run: |
38-
if [[ -z "${{ steps.find_readme.outputs.readme_file }}" ]]; then
39-
echo "::error::Readme file not found."
45+
changelog_section_start="== Changelog =="
46+
readme_file="$readme_file"
47+
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."
4054
exit 1
4155
fi
4256
43-
release_notes=$(grep '== Changelog ==' "${{ steps.find_readme.outputs.readme_file }}" | head -n -1 | tail -n +2)
44-
echo "::set-output name=notes::$release_notes"
57+
in_changelog=0
58+
found_version=0
59+
release_notes=""
60+
61+
echo "DEBUG: Starting to extract release notes from $readme_file for version $plugin_version."
62+
63+
while IFS= read -r line; do
64+
echo "DEBUG: Processing line: $line"
65+
66+
# Start processing after the changelog header
67+
if [[ "$line" == "$changelog_section_start" ]]; then
68+
in_changelog=1
69+
echo "DEBUG: Found changelog section header."
70+
continue
71+
fi
72+
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
77+
fi
78+
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"
102+
fi
103+
done < "$readme_file"
104+
105+
if [[ -z "$release_notes" ]]; then
106+
echo "::error::Failed to extract release notes for version ${plugin_version}."
107+
exit 1
108+
fi
109+
110+
echo "DEBUG: Successfully extracted release notes."
111+
echo "DEBUG: Release notes content:"
112+
echo -e "$release_notes"
113+
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
118+
119+
- name: WordPress Plugin Deploy
120+
id: deploy
121+
uses: 10up/action-wordpress-plugin-deploy@stable
122+
with:
123+
generate-zip: true
45124

46125
- name: Create GitHub Release
47126
uses: softprops/action-gh-release@v2
48127
with:
49128
tag_name: ${{ github.ref_name }}
50-
body: ${{ steps.release_notes.outputs.notes }}
129+
body: ${{ env.RELEASE_NOTES }}
51130
files: ${{github.workspace}}/${{ github.event.repository.name }}.zip
52131

53132
env:
54133
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
55134
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
56-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
135+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Contributors: codeboxr, manchumahara
33
Tags: changelog,history,release,version,product log
44
Requires at least: 5.3
5-
Tested up to: 6.7.1
6-
Stable tag: 2.0.1
5+
Tested up to: 6.7.2
6+
Stable tag: 2.0.3
77
Requires PHP: 7.4
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -16,7 +16,7 @@ This helps to write changes log for any digital products, projects releases. Any
1616

1717
### CBX Changelog by [Codeboxr](https://codeboxr.com/product/cbx-changelog-for-wordpress/)
1818

19-
📋 [Documentation](https://codeboxr.com/doc/cbxchangelog-doc/) | 🌟 [Upgrade to PRO](https://codeboxr.com/product/cbx-changelog-for-wordpress/#downloadarea) | 👨‍💻 [Free Support](https://wordpress.org/support/plugin/cbxchangelog/) | 🤴 [Pro Support](https://codeboxr.com/contact-us) | 📱 [Contact](https://codeboxr.com/contact-us/)
19+
>📺 [Live Demo](https://codeboxr.net/wordpress/changelog/cbx-changelog-wordpress-plugin-changelogs/) | 📋 [Documentation](https://codeboxr.com/doc/cbxchangelog-doc/) | 🌟 [Upgrade to PRO](https://codeboxr.com/product/cbx-changelog-for-wordpress/#downloadarea) | 👨‍💻 [Free Support](https://wordpress.org/support/plugin/cbxchangelog/) | 🤴 [Pro Support](https://codeboxr.com/contact-us) | 📱 [Contact](https://codeboxr.com/contact-us/)
2020

2121
**If you think any necessary feature is missing contact with us, we will add in new release. Best way to check the feature is, install the free core version in any dev site and explore**
2222

@@ -74,6 +74,13 @@ This helps to write changes log for any digital products, projects releases. Any
7474

7575

7676
== Changelog ==
77+
= 2.0.3 =
78+
* [updated] WordPress core 6.7.2 compatibility checked
79+
* [updated] Pro Addon V1.1.9 released
80+
* [updated] Misc improvements
81+
* [updated] Except cbxchangelog , other post type screen extra modification than core wordpress style is disabled
82+
83+
7784
= 2.0.1 =
7885
* [fixed] Fixed function missing error for method 'getPaginatedRows'
7986
* [new] Show labels by group feature added

assets/css/cbxchangelog-admin.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/cbxchangelog-listing.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)