Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow 'git commit' and 'git push' during the prepare and/or publish step #122

Closed
wants to merge 1 commit into from

Conversation

jfairley
Copy link

@jfairley jfairley commented Jan 25, 2019

Updates the plugin to allow for commit and push to execute during "prepare" or "publish" or both. By default, commit and push executes during the "prepare" step.

Examples

The default configuration executes commit/push during "prepare":

module.exports = {
	plugins: [
		['@semantic-release/git', {
			assets: ['pom.xml'],
			message: 'my message'
		}]
	]
};

A user may choose to explicitly call out the "prepare" step:

module.exports = {
	plugins: [
		['@semantic-release/git', {
			prepare: {
				assets: ['pom.xml'],
				message: 'my message'
			}
		}]
	]
};

A user may choose to execute commit/push during the "publish" step:

module.exports = {
	plugins: [
		['@semantic-release/git', {
			publish: {
				assets: ['pom.xml'],
				message: 'my message'
			}
		}]
	]
};

A user may choose to execute commit/push during the "prepare" and "publish" steps:

module.exports = {
	plugins: [
		['@semantic-release/git', {
			prepare: {
				assets: ['pom.xml'],
				message: 'my prepare message'
			},
			publish: {
				assets: ['pom.xml'],
				message: 'my publish message'
			}
		}]
	]
};

Finally, the old-school plugin definitions are also supported:

module.exports = {
	prepare: [{
		path: '@semantic-release/git',
		assets: ['pom.xml'],
		message: 'my prepare message'
	}],
	publish: [{
		path: '@semantic-release/git',
		assets: ['pom.xml'],
		message: 'my publish message'
	}]
};

closes #121
closes #123

@jfairley jfairley force-pushed the full-recycle branch 11 times, most recently from a525830 to e78104c Compare January 25, 2019 07:48
@jfairley
Copy link
Author

I'm having test parallelism issues, because there's multiple "commit" integration tests. Still working on it.

@jfairley jfairley force-pushed the full-recycle branch 2 times, most recently from 7c16138 to 6d10d6a Compare January 25, 2019 07:51
@pvdlg
Copy link
Member

pvdlg commented Jan 25, 2019

You opened 2 PRs but in none of them, as far as I can tell, you made the case for implementing a new feature. We won't consider any feature or new option without without a strong case supporting its merit.

I'm not really sure what workflow you are trying to support, but at minimum you have to explain what problem you are trying to solve, why it's the best way to solve this problem and how it can benefit semantic-release users in general.

For information, it's quite unlikely that we would modify our core plugins to support a very specific workflow used by a handful of users. Such cases should be covered with custom plugins.
Keep in mind that an additional option might not seems much but in reality it means more code/tests for us to maintain on the long run, more information to digest for users and ultimately more support tickets for us to handle.

If the feature you are trying to implement would bring value for the overall community and you can make the case for it we will definitely consider it.

@jfairley
Copy link
Author

@pvdlg I appreciate your feedback. I'll open a simple "issue" to lay out my problem statement. Family needs pending (😉), I'll work on that later tonight.

@jfairley jfairley force-pushed the full-recycle branch 3 times, most recently from 80fccb4 to 78fb525 Compare January 26, 2019 07:23
@jfairley
Copy link
Author

@pvdlg Sorry. Some things came up. I'm still going to make a write-up.

@pvdlg
Copy link
Member

pvdlg commented Nov 21, 2019

Closing per #123 (comment)

@pvdlg pvdlg closed this Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request: Support Maven releases
2 participants