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

Change changelog task to for direct invocation from external command #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

slindberg
Copy link
Collaborator

The commit message has more details, but this is a start to allow ember-cli-release to call the changelog task directly instead of relying on a hook in the release config. Intended to work with this branch of ember-cli-release.

Right now this is totally untested 🙈

This primarily changes the function signature of the `changelog` task to
always take the revision to start from and the name of the next
tag/version.

In order to be called externally however, an ember-cli project instance
needs to be passed in, which conflicted with the existing 'project'
config object. This meant two additional changes:

1. The arguments of helpers to avoid using `this` to make it clear that
the project instance may not have originated from the `changelog`
command.
2. The existing `project` is now merged with the user config to make
one master config object with all relevant options.
@runspired
Copy link
Collaborator

@slindberg we should probably chat about this, I suspect running with mods to release-with-changelog is going to work easier.

console.log(project);
return generateChangelog.call(project);
return generateChangelog(project, tags.latest, tags.next);
Copy link
Collaborator

Choose a reason for hiding this comment

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

The usage in this file was actually buggy, it was intended to be used this way:

beforeCommit: generateChangelog

We can account for separation of the tags in a wrapper function layer within either project if necessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I updated this line so that it would reflect my other changes, but like I said before I'd like to avoid making the user add this to their config/release.js, so I think the issue is moot.

@runspired
Copy link
Collaborator

I think my overall impression is that there are some good ideas in this PR, especially for code organization and flow, but I think it also missed too many things for me to accept as is. Ping me on slack if you want to run through these changes with me later, I think for me to have a better understanding of exactly how you intend it to be used by ember-cli-release is important.

@slindberg
Copy link
Collaborator Author

Sorry, I should have added a 'WIP' to the description. By battery was running low and I rushed to push out my progress so you could look at it. Definitely not mergable as-is. Let's definitely chat about it.

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