Skip to content

Commit 8fb9a20

Browse files
committed
add spec in readme
1 parent b28879e commit 8fb9a20

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
[![E2E Tests](https://github.com/codebtech/wp-feature-flags/actions/workflows/e2e.yml/badge.svg)](https://github.com/codebtech/wp-feature-flags/actions/workflows/e2e.yml)
66
[![codecov](https://codecov.io/github/codebtech/wp-feature-flags/graph/badge.svg?token=QNUWGCRJGR)](https://codecov.io/github/codebtech/wp-feature-flags)
77

8+
Stable tag: 0.3.2
9+
Requires at least: 6.2
10+
Tested up to: 6.4
11+
Requires PHP: 8.1
12+
813
WordPress Feature flags plugin allow developers to configure features in plugins/themes behind the feature flags on both the server (PHP) and client (JS/TS) side.
914

1015
## Installation

scripts/version.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const package = require('../package.json');
55

66
const packagePath = path.join(process.cwd(), 'package.json');
77
const phpPath = path.join(process.cwd(), 'plugin.php');
8+
const readmePath = path.join(process.cwd(), 'README.md');
89

910
const bumpTypes = ['patch', 'minor', 'major'];
1011

@@ -51,13 +52,21 @@ const getNewVersion = () => {
5152
2
5253
);
5354

54-
const [php] = await Promise.all([fs.promises.readFile(phpPath, fsOpts)]);
55+
const [php, readme] = await Promise.all([
56+
fs.promises.readFile(phpPath, fsOpts),
57+
fs.promises.readFile(readmePath, fsOpts),
58+
]);
5559

5660
const newPHP = php.replace(new RegExp(previousVersion, 'g'), newVersion);
61+
const newReadme = readme.replace(
62+
new RegExp(previousVersion, 'g'),
63+
newVersion
64+
);
5765

5866
await Promise.all([
5967
fs.promises.writeFile(packagePath, newPackage, fsOpts),
6068
fs.promises.writeFile(phpPath, newPHP, fsOpts),
69+
fs.promises.writeFile(readmePath, newReadme, fsOpts),
6170
]);
6271

6372
// eslint-disable-next-line no-console

0 commit comments

Comments
 (0)