Skip to content

Commit

Permalink
fix: use home instead of cwd as settingsPath as action/setup-java cre…
Browse files Browse the repository at this point in the history
…ates a default file there

BREAKING CHANGE: The default for the `settingsPath` changes from `.m2/settings.xml` to `~/.m2/settings.xml`. This is the same path that `action/setup-java` uses by default.
  • Loading branch information
simonseyock committed Sep 13, 2023
1 parent cda42c7 commit 67cb228
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 67cb228

Please sign in to comment.