Skip to content

Commit 2e9762c

Browse files
authored
Merge pull request #8365 from kenjis/update-prepare-release.php
chore: add code to update version number in "phpdoc.dist.xml"
2 parents bf2437e + 7aa8a78 commit 2e9762c

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

admin/RELEASE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ Work off direct clones of the repos so the release branches persist for a time.
9090
and `release = '4.x.x'`
9191
* Update **user_guide_src/source/changelogs/{version}.rst**
9292
* Set the date to format `Release Date: January 31, 2021`
93+
* Update **phpdoc.dist.xml** with the new `<title>CodeIgniter v4.x API</title>`
94+
and `<version number="4.x.x">`
9395
* Commit the changes with `Prep for 4.x.x release`
9496
* [ ] Create a new PR from `release-4.x.x` to `develop`:
9597
* Title: `Prep for 4.x.x release`

admin/prepare-release.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ function replace_file_content(string $path, string $pattern, string $replace): v
4848
"release = '{$version}'"
4949
);
5050

51+
// Updates version number in "phpdoc.dist.xml".
52+
replace_file_content(
53+
'./phpdoc.dist.xml',
54+
'!<title>CodeIgniter v.*? API</title>!mu',
55+
"<title>CodeIgniter v{$minor} API</title>"
56+
);
57+
replace_file_content(
58+
'./phpdoc.dist.xml',
59+
'/<version number=".*?">/mu',
60+
"<version number=\"{$version}\">"
61+
);
62+
5163
// Updates release date in changelogs.
5264
$date = date('F j, Y');
5365
replace_file_content(

0 commit comments

Comments
 (0)