Skip to content

Commit

Permalink
Merge pull request #8365 from kenjis/update-prepare-release.php
Browse files Browse the repository at this point in the history
chore: add code to update version number in "phpdoc.dist.xml"
  • Loading branch information
kenjis authored Dec 25, 2023
2 parents bf2437e + 7aa8a78 commit 2e9762c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions admin/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ Work off direct clones of the repos so the release branches persist for a time.
and `release = '4.x.x'`
* Update **user_guide_src/source/changelogs/{version}.rst**
* Set the date to format `Release Date: January 31, 2021`
* Update **phpdoc.dist.xml** with the new `<title>CodeIgniter v4.x API</title>`
and `<version number="4.x.x">`
* Commit the changes with `Prep for 4.x.x release`
* [ ] Create a new PR from `release-4.x.x` to `develop`:
* Title: `Prep for 4.x.x release`
Expand Down
12 changes: 12 additions & 0 deletions admin/prepare-release.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ function replace_file_content(string $path, string $pattern, string $replace): v
"release = '{$version}'"
);

// Updates version number in "phpdoc.dist.xml".
replace_file_content(
'./phpdoc.dist.xml',
'!<title>CodeIgniter v.*? API</title>!mu',
"<title>CodeIgniter v{$minor} API</title>"
);
replace_file_content(
'./phpdoc.dist.xml',
'/<version number=".*?">/mu',
"<version number=\"{$version}\">"
);

// Updates release date in changelogs.
$date = date('F j, Y');
replace_file_content(
Expand Down

0 comments on commit 2e9762c

Please sign in to comment.