Skip to content

Commit 430505e

Browse files
Merge pull request #4229 from nextcloud/ci/release/missing-pre-commit-script
ci(release): Add missing pre-commit hook script
2 parents 52ffe27 + 5a8edd6 commit 430505e

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ yarn-error.log*
1919

2020
js/
2121
/css/
22-
build/
22+
23+
# packaged app
24+
build/artifacts
25+
2326
coverage*
2427
vendor/
2528

build/pre-commit.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
3+
* SPDX-License-Identifier: AGPL-3.0-or-later
4+
*/
5+
6+
const fs = require('fs')
7+
8+
exports.preCommit = (props) => {
9+
const old = fs.readFileSync('appinfo/info.xml').toString('utf-8')
10+
11+
const updated = old.replace(/<version>(.+?)<\/version>/, '<version>' + props.version + '</version>')
12+
13+
fs.writeFileSync('appinfo/info.xml', updated)
14+
}

0 commit comments

Comments
 (0)