-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtagy.js
More file actions
22 lines (19 loc) · 686 Bytes
/
tagy.js
File metadata and controls
22 lines (19 loc) · 686 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const path = require('path');
const replace = require('replace-in-file');
module.exports = (newVersion, oldVersion, args) => {
replace.sync({
files: path.resolve(__dirname, 'src/plugin-base.php'),
from: /define\( 'FASTDEV_VERSION', '\d+\.\d+\.\d+' \)/g,
to: `define( 'FASTDEV_VERSION', '${newVersion}' )`,
});
replace.sync({
files: path.resolve(__dirname, 'src/plugin-base.php'),
from: /Version: \d+\.\d+\.\d+/g,
to: `Version: ${newVersion}`,
});
replace.sync({
files: path.resolve(__dirname, 'src/readme.txt'),
from: /Stable tag: \d+\.\d+\.\d+/g,
to: `Stable tag: ${newVersion}`,
});
}