diff --git a/lib/prepare.js b/lib/prepare.js index 2475142..fb4eeed 100644 --- a/lib/prepare.js +++ b/lib/prepare.js @@ -1,18 +1,15 @@ const { exec, findMaven } = require('./util') module.exports = async function publish(pluginConfig, context) { - const { env, cwd, logger, nextRelease } = context + const { logger, nextRelease } = context logger.log(`Updating pom.xml to version ${nextRelease.version}`) const mvn = await findMaven() - await exec( - mvn, - [ - 'versions:set', - '-B', - '-DgenerateBackupPoms=false', - `-DnewVersion=${nextRelease.version}` - ], - { cwd, env } - ) + await exec(mvn, [ + 'versions:set', + '-B', + '-ntp', + '-DgenerateBackupPoms=false', + `-DnewVersion=${nextRelease.version}` + ]) } diff --git a/lib/publish.js b/lib/publish.js index 63258a8..f28123e 100644 --- a/lib/publish.js +++ b/lib/publish.js @@ -3,14 +3,14 @@ const path = require('path') const { exec, findMaven } = require('./util') module.exports = async function publish(pluginConfig, context) { - const { env, cwd, logger, nextRelease } = context + const { logger, nextRelease } = context logger.log('Deploying version %s with maven', nextRelease.version) const mvn = await findMaven() const settings = path.join(__dirname, '../settings.xml') - const args = ['deploy', '-B', '-DskipTests', '--settings', settings] + const args = ['deploy', '-B', '-ntp', '-DskipTests', '-s', settings] if (pluginConfig.profile) { args.push('-P', pluginConfig.profile) } - await exec(mvn, args, { cwd, env }) + await exec(mvn, args) } diff --git a/lib/verify.js b/lib/verify.js index 177cf57..76efed1 100644 --- a/lib/verify.js +++ b/lib/verify.js @@ -39,8 +39,8 @@ module.exports = async function verifyConditions(pluginConfig, context) { throw new AggregateError(errors) } - const key = path.join(__dirname, '../secret.asc') - fs.writeFileSync(key, getEnv('GPG_PRIVATE_KEY')) - await exec('gpg', ['--import', '--batch', key]) - fs.unlinkSync(key) + const secret = path.join(__dirname, '../secret.asc') + fs.writeFileSync(secret, getEnv('GPG_PRIVATE_KEY')) + await exec('gpg', ['--import', '--batch', secret]) + fs.unlinkSync(secret) }