Skip to content

Commit

Permalink
Merge pull request #4229 from nextcloud/ci/release/missing-pre-commit…
Browse files Browse the repository at this point in the history
…-script

ci(release): Add missing pre-commit hook script
  • Loading branch information
ChristophWurst authored Nov 27, 2024
2 parents 52ffe27 + 5a8edd6 commit 430505e
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 430505e

Please sign in to comment.