Skip to content

Commit

Permalink
Merge pull request #28 from terrestris/settings-path-default
Browse files Browse the repository at this point in the history
fix: use home instead of cwd as settingsPath
  • Loading branch information
simonseyock authored Jan 17, 2024
2 parents cda42c7 + 67cb228 commit b379b5b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/plugin-config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @typedef {Object} PluginConfig
* @property {string} [settingsPath='.m2/settings.xml'] Path to a maven settings file.
* @property {string} [settingsPath='~/.m2/settings.xml'] Path to a maven settings file.
* @property {boolean} [processAllModules=false] This sets the `processAllModules` option for the `versions:set` target. It is useful for multimodule projects.
* @property {'deploy'|'package jib:build'|'deploy jib:build'} [mavenTarget='deploy'] This determines which mvn targets are used to publish.
* @property {boolean} [clean=true] Whether the `clean` target will be applied before publishing.
Expand Down
2 changes: 1 addition & 1 deletion src/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = async function prepare(pluginConfig, {
}) {
logger.log('prepare maven release');

const settingsPath = pluginConfig.settingsPath || '.m2/settings.xml';
const settingsPath = pluginConfig.settingsPath || '~/.m2/settings.xml';

if (!/^[\w~./-]*$/.test(settingsPath)) {
throw new Error('config settingsPath contains disallowed characters');
Expand Down
2 changes: 1 addition & 1 deletion src/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = async function publish(pluginConfig, {
}) {
logger.log('publish mvn release');

const settingsPath = pluginConfig.settingsPath || '.m2/settings.xml';
const settingsPath = pluginConfig.settingsPath || '~/.m2/settings.xml';
const mavenTarget = pluginConfig.mavenTarget || 'deploy';
const clean = pluginConfig.clean || true;
const debug = pluginConfig.debug || false;
Expand Down
2 changes: 1 addition & 1 deletion src/success.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = async function success(pluginConfig, {
});

if (updateSnapshotVersionOpt) {
const settingsPath = pluginConfig.settingsPath || '.m2/settings.xml';
const settingsPath = pluginConfig.settingsPath || '~/.m2/settings.xml';

if (!/^[\w~./-]*$/.test(settingsPath)) {
throw new Error('config settingsPath contains disallowed characters');
Expand Down

0 comments on commit b379b5b

Please sign in to comment.