Skip to content

Commit

Permalink
fix: no transfer progress
Browse files Browse the repository at this point in the history
  • Loading branch information
akijoey committed Sep 10, 2021
1 parent dab2654 commit d2171ba
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
19 changes: 8 additions & 11 deletions lib/prepare.js
Original file line number Diff line number Diff line change
@@ -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}`
])
}
6 changes: 3 additions & 3 deletions lib/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
8 changes: 4 additions & 4 deletions lib/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit d2171ba

Please sign in to comment.