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

Adds support for overidding getIncrementLevelFromCommit with command line flags --patch|-p --minor|-m --major|-M #115

Closed
wants to merge 2 commits into from

Conversation

danielmahon
Copy link

No description provided.

…d line flags `--patch|-p` `--minor|-m` `--major|-M`
@ghost
Copy link

ghost commented Mar 27, 2018

@danielmahon, status checks have failed for this PR. Please make appropriate changes and recommit.

@danielmahon
Copy link
Author

this makes it easier to create npm scripts to handle releases, If I'm not mistaken, currently I would need 3 different config files or pass the version in the commit message (which I don't need to do). With this update I can create scripts like the following:

package.json

...
  "scripts": {
    "release:minor": "versionist --minor",
    "release:patch": "versionist --patch",
    "release:major": "versionist --major"
  },
...

Im also using the versionist-plugins to handle commiting, tagging, and pushing, but If I wasn't I could chain commands here

@danielmahon
Copy link
Author

here is the corresponding config:

versionist.conf.js

const plugins = require('versionist-plugins');

module.exports = {
  updateVersion: [plugins.git.commit, plugins.git.tag, plugins.git.push],
  template: [
    '## v{{version}} - {{moment date "Y-MM-DD"}}',
    '',
    '{{#each commits}}',
    '- {{capitalize this.subject}}',
    '{{/each}}',
  ].join('\n'),
  getGitReferenceFromVersion: version => `v${version}`,
};

@ghost
Copy link

ghost commented Mar 27, 2018

@danielmahon, status checks have failed for this PR. Please make appropriate changes and recommit.

@danielmahon
Copy link
Author

Thoughts on implementing this? Do I need to fix something?

@brownjohnf
Copy link

@resin-ci retest

@ab77 ab77 closed this Jul 12, 2022
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.

3 participants