Skip to content

Commit

Permalink
Merge pull request #4254 from nextcloud/backport/4253/stable6.1
Browse files Browse the repository at this point in the history
[stable6.1] fix: convert pre-commit.js to ES module
  • Loading branch information
hamza221 authored Dec 19, 2024
2 parents 3497923 + 6ec1672 commit fa13535
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build/pre-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

const fs = require('fs')
import { readFileSync, writeFileSync } from 'fs'

exports.preCommit = (props) => {
const old = fs.readFileSync('appinfo/info.xml').toString('utf-8')
export function preCommit(props) {
const old = readFileSync('appinfo/info.xml').toString('utf-8')

const updated = old.replace(/<version>(.+?)<\/version>/, '<version>' + props.version + '</version>')

fs.writeFileSync('appinfo/info.xml', updated)
writeFileSync('appinfo/info.xml', updated)
}

0 comments on commit fa13535

Please sign in to comment.