File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 4040 " README.md" ,
4141 " CHANGELOG.md" ,
4242 " LICENSE"
43- ]
44- }
43+ ],
44+ "standard-version" : {
45+ "bumpFiles" : [
46+ {
47+ "filename" : " package-lock.json" ,
48+ "type" : " json"
49+ },
50+ {
51+ "filename" : " package.json" ,
52+ "type" : " json"
53+ },
54+ {
55+ "filename" : " plugin.php" ,
56+ "updater" : " wp-plugin-version-updater.js"
57+ }
58+ ]
59+ }
60+ }
Original file line number Diff line number Diff line change 1+ module . exports . readVersion = function ( contents ) {
2+ const capturingRegex = / V e r s i o n : (?< vnum > [ 0 - 9 ] \. [ 0 - 9 ] \. [ 0 - 9 ] ) / ;
3+ const found = contents . match ( capturingRegex ) ;
4+ return found . groups . vnum ;
5+ } ;
6+
7+ module . exports . writeVersion = function ( _contents , version ) {
8+ const regex = / V e r s i o n : (?< vnum > [ 0 - 9 ] \. [ 0 - 9 ] \. [ 0 - 9 ] ) / ;
9+ return _contents . replace ( regex , 'Version: ' + version ) ;
10+ } ;
You can’t perform that action at this time.
0 commit comments