Skip to content

Commit

Permalink
chore: update release scripts to follow new style
Browse files Browse the repository at this point in the history
  • Loading branch information
ElMassimo committed Nov 6, 2024
1 parent 642c178 commit e710c1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/changelog.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const resolve = paths => path.resolve(__dirname, `../${name}/${paths}`)
* @param {string} name
*/
function writePackageJson (name) {
const versionRegex = /VERSION = '([\d.]+(?:[-.]\w+)?)'/
const versionRegex = /VERSION = "([\d.]+(?:[-.]\w+)?)"/
const versionFile = fs.readFileSync(resolve(`lib/${name}/version.rb`), 'utf-8')
const versionCaptures = versionFile.match(versionRegex)
const version = versionCaptures && versionCaptures[1]
Expand Down
4 changes: 2 additions & 2 deletions scripts/release.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function resolve (paths) {
}

function rubyPackage () {
const versionRegex = /VERSION = '([\d.]+(?:[-.]\w+)?)'/
const versionRegex = /VERSION = "([\d.]+(?:[-.]\w+)?)"/
const path = resolve(`lib/${name}/version.rb`)
const content = fs.readFileSync(path, 'utf-8')
const versionCaptures = content.match(versionRegex)
Expand All @@ -98,7 +98,7 @@ function rubyPackage () {
content,
version,
updateVersion (version) {
const newContent = content.replace(versionRegex, `VERSION = '${version}'`)
const newContent = content.replace(versionRegex, `VERSION = "${version}"`)
fs.writeFileSync(path, `${newContent}`)
},
}
Expand Down

0 comments on commit e710c1a

Please sign in to comment.