-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #995 from Codeinwp/development
- Loading branch information
Showing
4 changed files
with
29 additions
and
1,081 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const replace = require('replace-in-file'); | ||
|
||
async function updateChangelog() { | ||
const options = { | ||
files: 'readme.txt', | ||
from: /== Changelog ==[\s\S]*?\[See changelog for all versions\]/, | ||
to: (match) => { | ||
return `== Changelog ==\n\n${process.env.nextReleaseNotes}\n\n[See changelog for all versions]`; | ||
}, | ||
encoding: 'utf8', | ||
}; | ||
try { | ||
const results = await replace(options); | ||
console.log('Replacement results:', results); | ||
} catch (error) { | ||
console.error('Error occurred:', error); | ||
} | ||
} | ||
|
||
updateChangelog(); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.