diff --git a/.gitignore b/.gitignore index 50e11cde2..05d270f49 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,10 @@ yarn-error.log* js/ /css/ -build/ + +# packaged app +build/artifacts + coverage* vendor/ diff --git a/build/pre-commit.js b/build/pre-commit.js new file mode 100644 index 000000000..225f757d0 --- /dev/null +++ b/build/pre-commit.js @@ -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>/, '' + props.version + '') + + fs.writeFileSync('appinfo/info.xml', updated) +}