diff --git a/README.md b/README.md index 39cda96..61bfa1b 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,4 @@ It does not do any checks, but only tries to increase the version number via `mv * `settingsPath`: path to a maven settings file (default: `'.m2/settings.xml'`) * `deployMethod`: either `'deploy'` or `'jib'`. This determines which mvn targets are used to deploy. `deploy` uses the `deploy` target and `jib` uses `package jib:build` (default: `'deploy'`) * `updateSnapshotVersion`: either `true` or `false`. Whether a new snapshot version should be set after releasing. (default: `false`) +* `snapshotCommitMessage`: the commit message used if a new snapshot version should be created (default: `'chore: setting next snapshot version [skip ci]'`) diff --git a/src/publish.js b/src/publish.js index a11c37d..830db97 100644 --- a/src/publish.js +++ b/src/publish.js @@ -2,7 +2,7 @@ const { deploy } = require("./maven"); -module.exports = async function publish (pluginConfig, { +module.exports = async function publish(pluginConfig, { logger, nextRelease }) { diff --git a/src/success.js b/src/success.js index be20af4..094e73c 100644 --- a/src/success.js +++ b/src/success.js @@ -8,7 +8,7 @@ const { push } = require('@semantic-release/git/lib/git') -module.exports = async function success (pluginConfig, { +module.exports = async function success(pluginConfig, { logger, env, cwd, @@ -16,13 +16,14 @@ module.exports = async function success (pluginConfig, { options: { repositoryUrl } }) { const updateSnapshotVersionOpt = pluginConfig.updateSnapshotVersion || false; + const snapshotCommitMessage = pluginConfig.snapshotCommitMessage || 'chore: setting next snapshot version [skip ci]'; if (updateSnapshotVersionOpt) { await updateSnapshotVersion(logger); const execaOptions = { env, cwd }; logger.log('Staging pom.xml'); await add(['pom.xml'], execaOptions); logger.log('Committing pom.xml'); - await commit('chore: Setting next snapshot version [skip ci]', execaOptions); + await commit(snapshotCommitMessage, execaOptions); logger.log('Pushing commit'); await push(repositoryUrl, branch.name, execaOptions); } diff --git a/src/verify-conditions.js b/src/verify-conditions.js index 7ae0f49..371157e 100644 --- a/src/verify-conditions.js +++ b/src/verify-conditions.js @@ -2,7 +2,7 @@ const { testMvn } = require("./maven"); -module.exports = async function prepare(pluginConfig, context) { +module.exports = async function verifyConditions(pluginConfig, context) { const { logger } = context;