Skip to content

Commit

Permalink
ci(release): Add missing pre-commit hook script
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst authored and backportbot[bot] committed Nov 27, 2024
1 parent 04b11c0 commit 6bff374
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ yarn-error.log*

js/
/css/
build/

# packaged app
build/artifacts

coverage*
vendor/

Expand Down
14 changes: 14 additions & 0 deletions build/pre-commit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

const fs = require('fs')

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

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

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

0 comments on commit 6bff374

Please sign in to comment.