diff --git a/build-aux/cargo-updater.js b/build-aux/cargo-updater.js index 1b64fda4..f91b9074 100644 --- a/build-aux/cargo-updater.js +++ b/build-aux/cargo-updater.js @@ -1,4 +1,5 @@ const TOML = require('@iarna/toml') +const { exec } = require('node:child_process') module.exports.readVersion = function (contents) { const data = TOML.parse(contents) @@ -6,7 +7,11 @@ module.exports.readVersion = function (contents) { } module.exports.writeVersion = function (contents, version) { - const data = TOML.parse(contents) - data.package.version = version - return TOML.stringify(data) + exec('cargo-set-version set-version ' + version, (err, output) => { + if (err) { + console.error("Could not run Cargo subcommand to set version: ", err) + return + } + }) + return contents } diff --git a/configure.ac b/configure.ac index 70027537..84588dac 100644 --- a/configure.ac +++ b/configure.ac @@ -127,12 +127,13 @@ AM_COND_IF([DEPENDENCY_CHECKS], [ ]) AM_COND_IF([DEVELOPER_MODE], [ + QUE_PROGVAR([cargosetversion], [cargo-set-version]) QUE_PROGVAR([checkmake]) QUE_PROGVAR([luacheck]) QUE_PROGVAR([ruff]) QUE_PROGVAR([stylua]) - QUE_PROGVAR([tr]) QUE_PROGVAR([taplo]) + QUE_PROGVAR([tr]) QUE_PROGVAR([typos]) ])