
6 changed files with 1660 additions and 62 deletions
@ -0,0 +1,19 @@
|
||||
module.exports = { |
||||
"scripts": { |
||||
postbump: "composer readme" |
||||
}, |
||||
"skip": { |
||||
commit: true, |
||||
tag: true |
||||
}, |
||||
"bumpFiles": [ |
||||
{ |
||||
filename: "style.css", |
||||
updater: "bin/version-style.js" |
||||
}, |
||||
{ |
||||
filename: "readme.txt", |
||||
updater: "bin/version-readme.js" |
||||
} |
||||
] |
||||
} |
@ -0,0 +1,10 @@
|
||||
module.exports.readVersion = function(contents) { |
||||
const pattern = /Stable tag:\s*([0-9]*.*)/i; |
||||
return contents.match(pattern)[1]; |
||||
}; |
||||
|
||||
module.exports.writeVersion = function(contents, version) { |
||||
const pattern = /Stable tag:\s*([0-9]*.*)/i; |
||||
const oldVersion = contents.match(pattern)[1]; |
||||
return contents.replace(oldVersion, version); |
||||
}; |
@ -0,0 +1,10 @@
|
||||
module.exports.readVersion = function(contents) { |
||||
const pattern = /Version:\s*([0-9]*.*)/i; |
||||
return contents.match(pattern)[1]; |
||||
}; |
||||
|
||||
module.exports.writeVersion = function(contents, version) { |
||||
const pattern = /Version:\s*([0-9]*.*)/i; |
||||
const oldVersion = contents.match(pattern)[1]; |
||||
return contents.replace(oldVersion, version); |
||||
}; |
Loading…
Reference in new issue