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(releaseType): expose at hooks ("major", "minor", ...) #441

Merged
merged 3 commits into from
Nov 26, 2019

Conversation

kazupon
Copy link
Contributor

@kazupon kazupon commented Nov 24, 2019

Sometimes it is useful to pass release type as the release meta information to hooks.

e.g. shipjs.config.js:

  const releaseEmoji = {
    patch: ':sparkles:',
    minor: ':tada:',
    major: ':confetti_ball:',
    // ...
  }
  formatCommitMessage: ({ version, type, }) => 
    `${releaseEmoji[type]}: release(${type}) v${version}`

I've also passed release Type or type as an argument to some hooks as release type.

GUIDE.md Outdated
@@ -283,7 +283,7 @@ const fs = require("fs");
const path = require("path");

module.exports = {
versionUpdated: ({ version, dir, exec }) => {
versionUpdated: ({ version, type, dir, exec }) => {
Copy link
Contributor

@eunjae-lee eunjae-lee Nov 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, what about using releaseType everywhere? What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, that's make sense.
I'll try to fix.

Copy link
Contributor

@eunjae-lee eunjae-lee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kazupon Hi there, thanks for the PR.
This looks good 😄

@kazupon
Copy link
Contributor Author

kazupon commented Nov 26, 2019

I’ve fixed it!

@eunjae-lee eunjae-lee changed the title feat: release type feat(releaseType): expose at hooks ("major", "minor", ...) Nov 26, 2019
@eunjae-lee eunjae-lee merged commit c855dbd into algolia:master Nov 26, 2019
@kazupon kazupon deleted the feat/release-type branch November 26, 2019 14:34
@eunjae-lee eunjae-lee mentioned this pull request Jan 7, 2020
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.

2 participants